dispose method
Releases the native object. Idempotent.
Implementation
@override
void dispose() {
if (!_instantiated) {
// Never instantiated, so no store took ownership of the trampolines.
for (final trampoline in _trampolines) {
trampoline.close();
}
}
_trampolines.clear();
super.dispose();
}