On Sun, May 5, 2013 at 4:14 AM, Aaron Cruz <aa...@aaroncruz.com> wrote:
> I am trying to create a reset functionality in my Ruby code that will clean 
> up my consumer and playlist (Mlt::Factory.consumer and Mlt::Playlist 
> respectively).
> It seems like both the mlt_playlist_close and mlt_consumer_close functions 
> were made for this but they are not included in the SWIG bindings.
> Is there a reason they were left out?
> Is there a better way to to this with the already provided interface?
>
> I would like my server to handle the reset instead of having to reset my 
> server. I am also still having memory leak issues and I would like to tweak 
> some things like this for some experiments.
> --
> Thank you,
> Aaron


The C++ destructors call the C close functions. When you release
references in a scripting language and garbage collection occurs, then
the C++ destructors are called. If you want to make cleanup more
immediate in the scripting language runtime, then set the vars holding
reference to nil and force processing the garbage collection. If you
call the C close functions directly, then the C++ destructors will
(eventually) call close on invalid pointers.

--
+-DRD-+

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to