Deterministic resource freeing - delete deprecation (again)
    Steven Schveighoffer 
    schveiguy at yahoo.com
       
    Wed Apr 27 07:49:19 PDT 2011
    
    
  
On Wed, 27 Apr 2011 10:48:08 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:
> So for instance, if you have a Socket class which contains a file  
> descriptor, and a SocketStream class that contains a Socket,  
> SocketStream.dispose would call Socket.dispose, which would close the  
> file descriptor.  But the destructor of SocketStream would not call  
> Socket.dispose, since it does not know if the destructor could be called.
This should have read "since it does not know if the Socket memory is  
still valid"
-Steve
    
    
More information about the Digitalmars-d
mailing list