Closed
Bug 23353
Opened 26 years ago
Closed 25 years ago
leaking HandleCaseConversionShutdown3
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
M14
People
(Reporter: ftang, Assigned: ftang)
References
Details
(Whiteboard: fix in local tree. Need review)
Rick, by looking at the unix leak report I think you are leaking the
HandleCaseConversionShutdown3 and here is my finding . Hope it help
In
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/947266348.10890.gz&fullte
xt=1
HandleCaseConversion 8 0.00%
I think it is a small leakage.
And http://lxr.mozilla.org/seamonkey/source/xpcom/ds/bufferRoutines.h#536
and
536 class CCaseConversionServiceInitializer {
537 public:
538 CCaseConversionServiceInitializer(){
539 mListener = new HandleCaseConversionShutdown3();
540 if(mListener){
541 mListener->AddRef();
542 nsServiceManager::GetService(kUnicharUtilCID,
NS_GET_IID(nsICaseConversion),(nsISupports**) &gCaseConv, mListener);
543 }
544 }
545 protected:
546 HandleCaseConversionShutdown3* mListener;
547 };
Should you put a mListener->Release(); in the destructor ?I don't know when will
it be called since you use CCaseConversionServiceInitializer as a static
object.
Just my 2 cent....
I ask dp to add a shutdown routine in the nsIModule. I think we have couple
places cache frequently used object and we should release them from that dll
based shutdown routine. Maybe that is another way to do it.
Frank -- this is your code. I'd be greatful if you'd address this issue
yourself.
Assignee: rickg → ftang
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•26 years ago
|
||
My code ??? I don't think so. Howerver, I don't mind to fix that.
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M13
| Assignee | ||
Comment 3•26 years ago
|
||
I think the following is the right fix. Howerver, I have not test it yet. I will
send out for review after I test it under UNIX...
Index: bufferRoutines.h
===================================================================
RCS file: /m/pub/mozilla/xpcom/ds/bufferRoutines.h,v
retrieving revision 1.35
diff -c -r1.35 bufferRoutines.h
*** bufferRoutines.h 1999/12/21 07:49:34 1.35
--- bufferRoutines.h 2000/01/13 05:49:26
***************
*** 536,549 ****
class CCaseConversionServiceInitializer {
public:
CCaseConversionServiceInitializer(){
! mListener = new HandleCaseConversionShutdown3();
! if(mListener){
! mListener->AddRef();
! nsServiceManager::GetService(kUnicharUtilCID,
NS_GET_IID(nsICaseConversion),(nsISupports**) &gCaseConv, mListener);
}
}
- protected:
- HandleCaseConversionShutdown3* mListener;
};
#endif
--- 536,547 ----
class CCaseConversionServiceInitializer {
public:
CCaseConversionServiceInitializer(){
! HandleCaseConversionShutdown3* listener =
! new HandleCaseConversionShutdown3();
! if(listener){
! nsServiceManager::GetService(kUnicharUtilCID,
NS_GET_IID(nsICaseConversion),(nsISupports**) &gCaseConv, listener);
}
}
};
#endif
| Assignee | ||
Updated•26 years ago
|
Whiteboard: fix in local tree. Need review
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M13 → M14
| Assignee | ||
Comment 4•26 years ago
|
||
move to m14.
| Assignee | ||
Comment 5•25 years ago
|
||
patch check in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•