Tony Maro wrote:

Follow my steps here and see if I'm on track...


I have a TMemoryStream.
I pass it to TZLibReadArchive.Create()
When TZLibReadArchive is destroyed, it destroys my memorystream, instead of a copy of it or leaving it intact.

I'd think if I create a memory stream myself, then pass it to TZlibReadArchive, it shouldn't be freeing my object.

Yep, you are right :) When I first started making the components they were one component, so when I split them some things were copied that didn't need to be. For TZLibWriteArchive if you have not assigned an OutStream it will create one for you.

Remove the line "fStream.Free" from TZlibReadArchive.Destroy to stop this from happening.

Andrew

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to