Add default finalizer behavior for generated adaptors