I'm trying to fix 60228 and I have come upon the fact that
NS_NewByteStream doesn't copy its const char * data, but rather just
saves a pointer to it. This seems incorrect to me. In an asynchronous
situation, the const char * data could be de-allocated while the
nsIInputStream instance from NS_NewByteInputStream still exists and
hasn't yet been used.
The flip side of this is I have no way of de-allocating the data since
the method in which the memory is allocated returns before the
nsIInputStream is used. If I de-allocated it, the nsIInputStream would
be incorrect.
Is this a bug, or do I need to do some craziness to correctly
de-allocate my data?
Thanks,
Ed.
Sent via Deja.com
http://www.deja.com/