Add deprecated function recording
Add finalize support for no ref class