Hi, I finally found the way to write to the mailing list, dumb me, and sorry 
Dan for those private emails.

I'm using Mlt++ on a playout server I wrote and it works like charm. But I'm 
under the impression that it's leaking memory somewhere. To make things simple, 
I wrote a little test app that creates a new Producer every x seconds. The leak 
here is kinda "minor", after creating 1000 producers (and destroying them) I 
build something like 300 MB in Physical Memory. Here is the code to the test 
app:

 #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTimer>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    _i(0)
{
    ui->setupUi(this);
    Mlt::Factory::init();
    _profile = new Mlt::Profile("dv_pal");
    newProducer();
}
MainWindow::~MainWindow()
{
    delete ui;
}
void MainWindow::newProducer()
{
    Mlt::Producer *producer = new Mlt::Producer(*_profile, 
"/Users/larcho/Movies/01.avi", 0);
    producer->seek(40);
    delete producer;
    _i++;
    QTimer::singleShot(10, this, SLOT(newProducer()));
    qDebug() << _i;
}

This by the way was tested on QT 4.8.1 running on a Mac. But I noticed similar 
behavior on Ubuntu.

Am I not destroying the Producer object properly?

Thank you.

PS: When I create the producer with no id (new Producer() ) the leak is not 
present.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to