[EMAIL PROTECTED] wrote:
> Yes the thread was Java but XPCOM is simply a wrapper over the C++
> code is it not?

Java doesn't have anything equivalent to a destructor that runs when a 
variable goes out of scope. So there's no way to release an interface 
pointer automatically, until GC kicks in.

Same is true for XPCOM objects used from JavaScript.

> The example code is C++ and I meant inherent scoping
> of variables, so a variable declared in within a method should go out
> of scope.  The reason the code was written that way was to determine
> if the variable pointer settings will automatically go out of scope or
> I have to explicitly call addref.

AddRef? You mean Release?

> So the answer is "settings" will
> orphan unless I use addref.

You completely lost me here.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to