Closed
Bug 8248
Opened 25 years ago
Closed 25 years ago
XPConnect does not release wrapped C++ interfaces
Categories
(Core :: XPConnect, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: sfraser_bugs, Assigned: jband_mozilla)
Details
XPCOM objects created in JS are not being released on garbage collection of
their holding objects. For example, in the xpcom/sample example, we
create an instance of the sample object thusly:
var sample = Components.classes["component://netscape/sample/sample-
world"].createInstance();
sample = sample.QueryInterface(Components.interfaces.nsISample);
but when you leave the page, or close the window, the sample instance
in C++ never gets destroyed.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•25 years ago
|
||
Funny, I believe that this used to work right. I'm on it. I'm setting up some
test classes and I'll work this out.
Comment 2•25 years ago
|
||
Adding myself and Mike Ang to the cc list.
Reporter | ||
Comment 3•25 years ago
|
||
jband, you checked in what looked like a fix for this today, but I'm still seeing
the problem. Should I be?
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•25 years ago
|
||
I'm marking this fixed. Reopen as necessary...
I fixed a bug that would certainly cause this problem. The test code I've been
playing with makes xpconnect look clean. I just ran the sample in question and
it works for me. I set breakpoints in SampleImpl's ctor and dtor. I go to the
page and the ctor gets called. I go somewhere else and the dtor gets called.
Somtimes I need to navigate a little further before the dtor gets called, but
that's gc for you. If it's not working for you, then I'd like to hear more.
Reporter | ||
Comment 5•25 years ago
|
||
I can verify that this is fixed; I see the sample objbect being destroyed.
Comment 6•25 years ago
|
||
So Simon Fraser, Should I mark it verified ?
Reporter | ||
Comment 7•25 years ago
|
||
Yes.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 8•25 years ago
|
||
Marking this bug as verified. Thanx Simon.
You need to log in
before you can comment on or make changes to this bug.
Description
•