Hi Carlos, getting used to the memory pools was one big step I had to do when starting with PJSIP. It may be the same to you. You should be aware that no memory allocated from a memory pool can be released. It's as simple as that. You can free the memory only by destroying the pool itself. Thus you should think of your system as build by modules. Each module gets its own pool. All the components, e.g. ports, are getting their memory out of this pool. After the module has done its task, all its components are destroyed and the pool too. If you need the module again, you have to create anything new. What you declare as a module depends on you task. In a simple application a module may include a sound port, a codec and an rtp stack for streaming audio from the microfone to the network. All these components get created when starting the transmission and get destroyed after this. Therefore they share a memory pool which gets created at the beginning and destroyed at the end. A conference bridge makes this a little bit easier. You can create serveral modules and route their audio over the conference bridge when needed. Thus the modules can exist all the time. Only if needed they get connected to some other moduls. Think about what you want to do and how to modularize your system. Then you will see how much memory pools you will need. What you reuse depends on your task. Best regards, Thomas Falk 2010/9/17 carlos calvo <ccvillalain at gmail.com> > > How i am suppose to handle the memory in an application that > creates/destroys several conference bridge during run time: > - Should i use temporal pools for each conference and release them when it > is done? > - Should i re-use the conference/ports so i created them once when starting > the application? > - Is there any way to effectively free up the memory beside those destroy > methods? > > Maybe someone can give me a good hint regarding this memory management > issue > > Thanks, > Carlos. > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100920/54de708b/attachment.html>