what i do is :

"Foo() {
nsString toto;
toto.Assign(....);
.....
//free(toto)  -> crashes
//nsMemory::free(toto) -> crashes
Foo();
}"

This is the kind of recursivity and use of nsString variable. So i don't use
the "new" allocator.
if i intend to perform "free()" or "nsMemory::free()" before calling Foo(),
my application crashes.
If i don't try anything to release my variables, because the recursivity
allocates many times some variables, i have too much non released variables.

Thanks.
-- 
B�atrice Philippe

[EMAIL PROTECTED]
"Nicolas Weber" <[EMAIL PROTECTED]> a �crit dans le message de
news:[EMAIL PROTECTED]
> > How are you allocating them?  nsString is just a class.  If you allocate
> > an instance with operator new, then you will need to use operator free
> > to destroy the instance.
>
> You intended to write "operator delete" instead of "operator free" (?).
>
> - Nico


_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to