[W] MLK: Memory leak of 52 bytes from 1 block allocated in NS_NewUnicodeToUTF8(nsISupports *,nsID const&,void * *)

VERIFIED DUPLICATE of bug 110666

Status

MailNews Core
Internationalization
VERIFIED DUPLICATE of bug 110666
17 years ago
10 years ago

People

(Reporter: Navin Gupta, Assigned: Shanjian Li)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
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]
(Reporter)

Updated

17 years ago
Keywords: nsbeta1

Comment 1

17 years ago
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
(Assignee)

Comment 2

17 years ago
Created attachment 58421 [details] [diff] [review]
proposed patch, replace nsCOMPtr
(Assignee)

Comment 3

17 years ago
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
(Reporter)

Comment 4

17 years ago
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. 

Comment 6

17 years ago
I've already fixed this, and checked it in. You don't need to worry about your
patch anymore : see bug 110666

Comment 7

17 years ago

*** This bug has been marked as a duplicate of 110666 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
verified dup.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.