1.how can we handle exception inside constructors and finalize method?
2.what will happen when an exception occur inside constructors and
finalize()?
will it be properly garbage collected ?
3.can we call finalize method explicitly ? and what will happen then ?
Re: exception inside constructors and finalize ... > 1.how can we handle exception inside constructors and finalize method?... try/catch or (for constructors) throws clause - as usual. ... (comp.lang.java.help)
throw exception in the finalize ... in vb asp.net page i'm overriding the finalize method in order to make ...cleanup.... if i throw exception there it is not seen on the page. ... is there a way to throw exception on the finalize method in order to check ... (microsoft.public.dotnet.framework.aspnet)
Re: Is this possible... ... don't throw an exception, instead of calling log out, set it to null anyway. ... Then in the finalize method, put the code that has to happen on logout, so ... >> You could return empty values but it might be better to throw an ... (microsoft.public.dotnet.languages.csharp)
Re: type checking ... >it's not far from your favourite SWIG-supported language.... when its constructor raised an exception.... It hasn't really been an issue so far, but I guess C# constructors... This is one issue I already have with Java/C# style garbage collection... (comp.lang.python)
Re: Exception unwinding base destructor called - why? ... > We are creating an instance of Derived inside an exception handler.... > mechanism is calling the destructor for the base class. ... > Where is the logic in partially deconstructing an aggregate object that's ... > operations in my constructors (although I have not at this point worked ... (comp.lang.cpp)