>From "Overriding the Finalize Method" in the .NET Framework SDK documentation:
"An object's Finalize method should not call a method on any objects other than that of its base class. This is because the other objects being called could be collected at the same time as the calling object, such as in the case of a common language runtime shutdown." Dave -----Original Message----- From: Gustavo Garc�a Bernardo [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 11:24 AM To: [EMAIL PROTECTED] Subject: [Mono-list] Accessing member objects in destructors Hi, Reading the Mono code i have seen sometimes a class destructor access a method of a member object: Socket socket = new Socket(); ~XXXX { socket.Close (); } Is this correct? You can assert the socket object is not freed before XXX object? Thx, best regards. G. _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
