Thanks Christian for your confirmation.

Yes, I agree should cast back to real type and then delete it. Since the
code style uses own defined operator new and delete, it's easier to modify
allocation here as in your bug filing.

cheers,

John

"John" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I found the code snippet in nsJar.cpp has memory issue. But I cannot find
> who's owner of this module so I write to this group.
>
> //----------------------------------------------
> // nsJAR constructor/destructor
> //----------------------------------------------
> PR_STATIC_CALLBACK(PRBool)
> DeleteManifestEntry(nsHashKey* aKey, void* aData, void* closure)
> {
> //-- deletes an entry in  mManifestData.
>     PR_FREEIF(aData);
>   return PR_TRUE;
> }
>
> in PR_FREEIF(aData) in fact it call c lib function free(). But I think
here
> the void * comes from operator new. If I replase it with
> delete aData;
>
> the whole application runs much more stable even in win98.
>
> Is there any relative module owner can confirm it?
>
> thanks,
>
> -John
>
>


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to