After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586491 - Memory leak in Buffer.Data
Memory leak in Buffer.Data
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-sharp
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-20 21:19 UTC by Maarten Bosmans
Modified: 2009-09-11 08:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds example to show the memory leak (4.43 KB, patch)
2009-06-20 21:21 UTC, Maarten Bosmans
none Details | Review

Description Maarten Bosmans 2009-06-20 21:19:28 UTC
Somehow the buffer still manages to lose its data.
Comment 1 Maarten Bosmans 2009-06-20 21:21:57 UTC
Created attachment 137090 [details] [review]
Adds example to show the memory leak

This patch adds an example program to the samples.

The program sends buffers to an appsrc. Besides a good showcase of how to use buffer/appsrc, it also shows the memory leakage.
Comment 2 Maarten Bosmans 2009-06-20 23:01:11 UTC
Fortunately, it turned out the memory leak wasn't in gstreamer-sharp.

It is in Mono.Cairo or the sample app, however you want to see it. The Cairo.Surface needs to be explicitly destroyed.

On top of the previouse patch, apply:
-               return img.Data;
+               byte[] data = img.Data;
+               img.Destroy();
+               return data;

The testcase now runs smoothly, without eating up all your GBs of ram.

Please do add the corrected sample to the git tree, as it is a nice sample app.