On Mar 29, 2010, at 00:50, Francois PIETTE wrote:

> You are forgetting to free the memory. See TCustomLineWSocket.Destroy about 
> how to do it properly.

Wait, something just occurred to me: FRcvdPtr is of type FRcvdPtr, which is an 
Array Of Bytes, i.e. a dynamic array.  According to the Delphi documentation, 
dynamic arrays are allocated on the Heap and referenced-counted, and 
automatically freed when set to Nil by a garbage collector.

Wouldn't it be dangerous to call FreeMem() on it directly?

Since no exception is being thrown and it's been like this forever, I guess the 
garbage collector is guarding against it; but since this is not documented I 
don't think we should rely on it.

Or, am I missing something?

        dZ.


-- 
        DZ-Jay [TeamICS]
        http://www.overbyte.be/eng/overbyte/teamics.html

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to