[Ambulant-users] Multi-threading libambulant

João Pedro Cadinha est-j-cadinha at ptinovacao.pt
Mon Apr 27 17:13:18 CEST 2009


Hi,

I'm trying to use libambulant in a multi-thread architecture and I'm having some memory leak problems. I have a thread manager class that creates threads that implement several players (using the smil2::player class). I think my problem is in the destructor of the player because I had some segmentation faults when I tried to use the smil_player destructor. This error occurs in these invocations:
- m_scheduler->reset_document();
- delete m_scheduler;
- delete m_event_processor;

I don't think that the scheduler and the event processor are shared across all threads, but being shared can be the reason why they can't be destruct. A lock is being applied to the player destructor. Are there any other plausible causes for this memory leak problem?

I have also created a simple example that creates several threads that simply loaded a document, parsed it and destructed it and after several threads there was also a memory leak problem. Any ideas?

I used GDB for debugging and all unused threads exited this is definitely a memory allocation problem.

Thanks.
João Cadinha.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ambulantplayer.org/pipermail/ambulant-users/attachments/20090427/97b37cd6/attachment.html>


More information about the Ambulant-users mailing list