Hi Chris,
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.
P.S. I tried to post to n.p.m.netlib, but dejanews is broken at the
moment. I sent to [EMAIL PROTECTED] If this doesn't work, can
you please post it?