How to log when the finalize method was not called?

I am not using the finalize method in my application but this question is out of curiosity.

Assume that there is finalize method in a class and I would like to log a warning message that finalize was not called.

How to do this ?

Any tips ?

Leave a Reply

Your email address will not be published. Required fields are marked *