public interface EventCookie
When you are subscribing to COM events, com4j
makes sure that your object will not be garbage collected.
(Even if you release all the references to the event source
COM object, EventCookie
still retains an interface pointer.)
Therefore, you must call close()
to terminate
the subscription, or memory will leak.
Modifier and Type | Method and Description |
---|---|
void |
close()
Terminates the event subscription.
|
Copyright © 2014. All rights reserved.