[Freeswitch-dev] Fwd: thousands of memory leaks when using own module and mfc dll

Puskás Zsolt errotan at elder.hu
Thu Apr 22 12:11:35 PDT 2010

2010. április 22. 19.31.36 dátummal Sebastian Rudek az alábbiakat írta:
> Dear Freeswitch developers,
> i have a problem with FreeSwitch (Version 1.0.4) and my own module,
> which loads a MFC based DLL -- where obviously memory leaks are
> produced. let me try to explain what i have.
> 1) First of all, let's discuss the case where everything works fine in
> freeswitch. My FreeSwitch module (which here loads no further DLL) is
> loaded and unloaded correctly when a call is accepted and later on hung up.
> 2) Then i load an "empty" DLL, without MFC and all that stuff, which i
> created, within my FreeSwitch module. I do this when accepting a call.
> when hanging up, I FreeLibrary(), quit FreeSwitch and everything is
> fine. No memory leaks, no errors, just everything as it ought to be.
> 3) But then! Then i take my module and load a DLL which uses MFC. and
> then, when after unloading the DLL on hanging up, I exit the FreeSwitch
> application and get that many memory leak reports in the debug out of
> visual studio 2008... that leads me to my question: Are there any know
> issues with FreeSwitch and MFC DLLs ?
> I tried to simulate the problem with creating an Application which
> simply loads the Non-MFC DLL (see number 2 above). No memory leaks.
> Also, no memory leaks are detected when loading the MFC-DLL from 3) (see
> above). but Visual Studio detects one (!) 4-byte-memory-leak when
> loading the MFC DLL inside the Non-MFC-Dll (like the FreeSwitch module
> ought to do it).
> Back to the question, if there is an issue with FreeSwitch and MFC-DLLs.
> The object dump, which Visual Studio gives to me, says that leaks are
> detected at "VARCHAR(255)", "shma", "TeleTone" or "loopback.auto". I do
> not know where that comes from. Maybe, you have an idea which you could
> share with me to solve the problem, on which i have spent really much
> time already...
> I just attach the out as text file.
> Thank you so much in advance
> Sebastian

You should try the latest git version, 1.0.4 is very old:


More information about the FreeSWITCH-dev mailing list