add @Dispose hook support