Destructor must be called "Destroy", not "Free" Markus Mueller wrote: > Hi Wilfried, > > I have created an destructor Free, which inherited runs Free of > TWSocket. This > Free is never called; can anybody tell me why? > > Are you realy sure it is freed by calling Release if it is never calling > Free?! > > Regards, > Markus Mueller > >> Hello Markus, >> >> you have to destroy it outside an event handler. to do that you can call >> the Release method. Then it is destroyed when messages are pumped again, >> so after your code finish. >> >> --- >> Rgds, Wilfried [TeamICS] >> http://www.overbyte.be/eng/overbyte/teamics.html >> http://www.mestdagh.biz >> >> Tuesday, February 17, 2009, 10:40, Markus Müller wrote: >> >> >> >>> Hello Mailinglist, >>> >>> >> >> >>> my project is now just working great, thanks very much for your >>> help... but there is just one question. Cause it only works fine >>> if I don't free TWSocket objects. If I Free them it often works >>> fine. But in much cases - for example - in the OnSessionClose >>> Handler (the memory of the handler is provided by an other Object >>> not beeing freed) then I get strange behaviors. Sometimes it gives >>> memory errors on "InternalClose" functions, sometimes the application >>> just freezes completely (strange cause all TWSocket is in an own >>> thread) and Delphi crashes the hard way... >>> >>> >> >> >>> If I do "Abort" on an TWSocket, then the following lines are not >>> running... It seems that it calls "exit" withing the function? So my >>> "Free" is never reached. In this case I have completly no idear >>> how to Free such a socket.... >>> >>> >> >> >>> So my question is: How can I free a TWSocket object after the >>> connection has been closed, aborted or the handler reports that >>> the session has been closed. >>> >>> >> >> >>> Thanks for hints, >>> Much regards, >>> Markus Mueller >>> >>> >> >> > >
-- 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