RFC: PR1050 - Stream objects not garbage collected?

Andrew Hughes ahughes at redhat.com
Wed Jun 27 16:26:38 PDT 2012



----- Original Message -----
> Hi,
> 
> The attached patch is a fix for PR105. It was caused by the JVM
> hanging
> on to global references to Stream objects. A test case is included
> (causes an OutOfMemoryError without the fix). I did notice a few
> other
> structs not being free()d and removed them (or added calls to free()
> them).
> 
> Okay to commit?
> 
> ChangeLog:
> 2012-05-27  Omair Majid  <omajid at redhat.com>
> 
> * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java:
> Add new member variable contextPointer.
> * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c
> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new):
> Save j_context as contextPointer.
> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref):
> Delete the global ref and dellocate the java context
> (cork_callback): Don't check userdata. It is NULL.
> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork):
> Dont allocate and pass a java_context to pa_stream_cork. It is not
> needed.
> *
> pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java
> (testOpenCloseLotsOfTimes): New method.
> 
> Thanks,
> Omair
> 

Please do to 6, 7, 8.  Did you have any branches in mind too?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list