Tks Dennis, but the Q was:
> > QUESTION
> > BTW, you cant free a memorystream at the end of a function,
The function is part of a component, and I was concerned that by not freeing
the stream that is created within that component, that it hangs around. But
if you free it, it cant pass the result back to the calling routine, in
which of course, I eventually free the owner memory stream.
EG
Mystream:=gethestream(newstream);
//within the gethestream function a newstream is created and passed back as
a result, but newstream is not freed.
Maybe I am missing the point; I am creating _another_ memory stream within
the function, which is the utility stream, which is passed back as a result.
That is the stream I am concerned about.
Re other Q about the GetTempPath() function and the string allocation. I
think it was due to windows wanting a Pchar on that call, without extraneous
bytes after the desired lot.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz