Memory leak bug in the Java bindings
|
29-04-2013, 10:06 AM
Post: #1
|
|||
|
|||
Memory leak bug in the Java bindings
I've found a memory leak bug in the JNI code for the Java bindings. Some local object references are being allocated and never freed, and this causes the process to run out of memory.
The following files are affected: OpenHome/Net/Bindings/Java/CpDeviceList.c OpenHome/Net/Bindings/Java/CpProxy.c OpenHome/Net/Bindings/Java/DvDevice.c OpenHome/Net/Bindings/Java/DvDeviceStandard.c OpenHome/Net/Bindings/Java/DvProvider.c OpenHome/Net/Bindings/Java/InitParams.c OpenHome/Net/Bindings/Java/Invocation.c OpenHome/Net/Bindings/Java/Property.c I've produced a patch (attached) and I've tested this to verify that it fixes the problem. I found this problem while investigating another occurrence of the "QNAP hang" problem, and I'm fairly sure the hang is caused by an out-of-memory condition resulting from this bug. |
|||
30-04-2013, 09:03 AM
Post: #2
|
|||
|
|||
RE: Memory leak bug in the Java bindings
(29-04-2013 10:06 AM)simoncn Wrote: I've found a memory leak bug in the JNI code for the Java bindings. Some local object references are being allocated and never freed, and this causes the process to run out of memory. Thanks for spotting this! I've applied the fix as suggested. |
|||
30-04-2013, 10:02 AM
Post: #3
|
|||
|
|||
RE: Memory leak bug in the Java bindings | |||
« Next Oldest | Next Newest »
|