Closed Bug 23353 Opened 26 years ago Closed 25 years ago

leaking HandleCaseConversionShutdown3

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED

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
Status: NEW → ASSIGNED
My code ??? I don't think so. Howerver, I don't mind to fix that.
Target Milestone: M13
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
Whiteboard: fix in local tree. Need review
Target Milestone: M13 → M14
move to m14.
Blocks: 24854
patch check in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Keywords: verifyme
QA Contact: rickg → scc
Component: XP Utilities → String
mass remove verifyme requests greater than 4 months old
Keywords: verifyme
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.