Please fix this. it shows up multiple times in purify run [W] MLK: Memory leak of 52 bytes from 1 block allocated in NS_NewUnicodeToUTF8(nsISupports *,nsID const&,void * *) NS_NewUnicodeToUTF8(nsISupports *,nsID const&,void * *) [nsUnicodeToUTF8.cpp:56] nsComponentManager::CreateInstance(char const*,nsISupports *,nsID const&,void * *) [nsComponentManager.cpp:3472] nsCreateInstanceByContractID::()(nsID const&,void * *)const [nsComponentManager.cpp:153] nsCharsetConverterManager::GetUnicodeEncoder(nsString const*,nsIUnicodeEncoder * *) [nsCharsetConverterManager.cpp:510] nsCharsetConverterManager::GetUnicodeEncoder(nsIAtom const*,nsIUnicodeEncoder * *) [nsCharsetConverterManager.cpp:603] MIME_get_unicode_encoder [comi18n.cpp:1714] MimeInlineText_convert_and_parse_line [mimetext.cpp:383] MimeInlineText_rotate_convert_and_parse_line [mimetext.cpp:548] convert_and_send_buffer [mimebuf.cpp:168] mime_LineBuffer [mimebuf.cpp:255] MimeInlineText_parse_decoded_buffer [mimetext.cpp:334] MimeLeaf_parse_buffer [mimeleaf.cpp:168] MimeMessage_parse_line [mimemsg.cpp:226] convert_and_send_buffer [mimebuf.cpp:168] mime_LineBuffer [mimebuf.cpp:255] MimeObject_parse_buffer [mimeobj.cpp:255] nsStreamConverter::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,UINT,UINT) [nsStreamConverter.cpp:919] nsDocumentOpenInfo::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,UINT,UINT) [nsURILoader.cpp:240] nsMailboxProtocol::ReadMessageResponse(nsIInputStream *,UINT,UINT) [nsMailboxProtocol.cpp:570]
Reassign to shanjian. UTF-8 encoder does not have to be released per part since it is commonly needed but it has to be released before the shutdown.
Assignee: nhotta → shanjian
My guess about the problem, I declared encoder/decoder as nsCOMPtr pointer. But struct MimeInlineText was not destructed as MimeInlineText. It is removed as MimeObject, and release function of nsCOMPtr is not invoked. Navin, could you try my patch with purify to see if that fix the problem? thanks!
Status: NEW → ASSIGNED
cc ducarroz - mime owner. I will look out next time i run purify, cc stephend - when you run purify next time, could you also look out for this leak.
I've already fixed this, and checked it in. You don't need to worry about your patch anymore : see bug 110666
*** This bug has been marked as a duplicate of 110666 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.