This has worked in the past. I need to know more about your application before I offer to debug these things for you. Is it an open source project?
On Mon, May 6, 2013 at 8:46 AM, Aaron Cruz <aa...@aaroncruz.com> wrote: > Hi Dan, > What you suggested (setting to nil) has never worked for me in the past. > > I just created a little test to showcase this here > https://gist.github.com/pferdefleisch/1e448e3257837ebeb2b3 > My memory is never released. It stayed in my test with 100 short .movs right > around 200MB with 0.0% CPU. > I also tried something that I found on the SWIG page with the mlt.i file > (you can see in the gist). > > Since there seems to be no garbage collected playlist factory, I tried the > same test above but with just connecting the consumer to a non-playlist > producer with the same results, no memory released. > > I have also seen strange things happen like when I set 'autoclose' to 1, as > mlt plays my list, clips are removed, but memory is only released, and only > a tiny bit, when I append new videos. Maybe this is a separate bug. > -- > thanks for your time, > aaron > > On May 5, 2013, at 8:24 PM, Dan Dennedy wrote: > > 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-+ > > -- +-DRD-+ ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel