Question on usage of gst_deinit(), freeing of all allocated memory objects?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question on usage of gst_deinit(), freeing of all allocated memory objects?

Martin Maurer
Hi,

I have a question regarding gst_deinit().

In the docs

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-Gst.html#gst-deinit

it is mentioned

"This function is therefore mostly used by testsuites and other memory
profiling tools.

After this call GStreamer (including this method) should not be used
anymore."

Does gst_deinit() clean all previously allocated resources? So I get
back a clean environment?

When GStreamer it not allowed anymore after gst_deinit(), is it allowed
or forbidden to start a new "session" with gst_init()? How do testsuites
and memory profiling tools handle the case that previous testcase/action
could have messed around especially regarding memory allocation?

What comes in mind, what happens when I allocate an element (e.g. by
gst_element_factory), but don't attach it to anywhere, I must assure
that it does not get lost by my own. Ok newest gstreamer leak tracer can
help, so list of allocations exists, how is it handled especially free
of allocated objects?

Best regards,

Martin

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question on usage of gst_deinit(), freeing of all allocated memory objects?

Sebastian Dröge-3
On Fri, 2017-04-21 at 07:20 +0200, Martin Maurer wrote:

> Hi,
>
> I have a question regarding gst_deinit().
>
> In the docs
>
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-Gst.html#gst-deinit
>
> it is mentioned
>
> "This function is therefore mostly used by testsuites and other memory 
> profiling tools.
>
> After this call GStreamer (including this method) should not be used 
> anymore."
>
> Does gst_deinit() clean all previously allocated resources? So I get 
> back a clean environment?
It deallocates all one-time allocations done by GStreamer (but there
are more done by GLib and other libraries). And it does not deallocate
anything that was previously leaked due to bugs.

> When GStreamer it not allowed anymore after gst_deinit(), is it allowed 
> or forbidden to start a new "session" with gst_init()? How do testsuites 
> and memory profiling tools handle the case that previous testcase/action 
> could have messed around especially regarding memory allocation?

You can't run gst_init() after gst_deinit() anymore. The tests are
running each test in its own process.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (1019 bytes) Download Attachment
Loading...