throw exception in the finalize

  • Thread starter Thread starter z. f.
  • Start date Start date
Z

z. f.

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.
probably because the page has already sent to the client.
is there a way to throw exception on the finalize method in order to check
that objects were closed, but how do i trace this exception?

TIA, z.
 
hi z.f.
I dont know your requirement clearly but based on the fact of finalizer..you
dont have control as to when it gets called. hence try avoid finalization
usage
and use IDisposable interface implementation instead.

Av.
 
Back
Top