Closed Bug 151928 Opened 24 years ago Closed 24 years ago

Lack of DLLCanUndloadNow and/or LockServer function in XPCOM

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 98283

People

(Reporter: ftang, Assigned: dougt)

Details

MS COM have a framework to unload XPCOM DLL without causing crash. The way to implement it is to use LockServer and DllCanUnloadNow . Bascillay, the DLL have to track all the object it return by create instance and release. if the refcount of the total object is zero, then it could be unload. Otherwise, someone is still holding a reference to some object it return. The lack of this infrastructure in XPCOM cause the bug in 148889. there are a short term solution in 148889 to cache the dll untill the application shotdown. But the fix this problem in long term. We need to add this framework to xpcom. Fortunatelly, this could be added in a backward compatability way. Basically, if the dll do not export that symobl (DllCanUnloadNow), then we can assume it CANNOT be unload. If it does implmement that, then we ask it can unload now or not.
known problem. meta bug is here: http://bugzilla.mozilla.org/show_bug.cgi?id=98283 *** This bug has been marked as a duplicate of 98283 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
for more information, see IClassFactory::LockServer, DllCanUnloadNow in MS com about this issue. Here are some references: page 156-157, Inside COM, Microsoft's Component Object Model, Dale Rogerson, Microsoft Press, ISBN 1-57231-349-8 US$34.99 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/cmf_d2l_531z.asp http://www.pocketpclife.com/issues/issue199912/ceprogram1299001.html http://www.clipcode.net/content/crossing_dll_exe_boundaries.htm http://www.codeproject.com/shell/mkexesvc.asp 98283 is a meta bug, it could be more than what we need to address 148889
You need to log in before you can comment on or make changes to this bug.