On Wed, Mar 26, 2014 at 7:24 AM, Claudio Bley <cb...@av-test.de> wrote:
> At Wed, 26 Mar 2014 02:43:49 +0000, > Chris Ellis wrote: > > > > Currently nothing prevents the JNA callback objects used when registering > > for domain events from being garbage collected. JNA requires that > callback > > objects are not GCed whilst they are in use by C code. > > > > To solve this we hold a reference to the callback alongside the callback > id. > > This ensures that the JNA callback objects will retain in memory while > it is > > registered with the C layer. > > > > We also use an IdentityHashMap rather than a HashMap to store the > EventListener > > objects. > > --- > > src/main/java/org/libvirt/Connect.java | 37 > ++++++++++++++++++++++------------ > > 1 file changed, 24 insertions(+), 13 deletions(-) > > Nice catch. ACK. > Thanks. > > Should we squash this into patch 41/65 before pushing the series? > Yes that would make sense, or you can chain my patch at the end, I'll leave that upto you. I've noticed that there are some other related errors, I'll push patches for these later today. Chris
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list