Jean-Claude Wippler wrote:
Riccardo Cohen wrote:
The following code shows a memory leak. Is this a bug ? (compiled with visual studio.net)
Thanks
#define CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #include <stdio.h> #include <mk4.h>
void function() { c4_ViewProp subprop("sub"); }
int main (int argc, char **argv)
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );// check memory leak at exit
function();
return(0);
}
There is a global symbol table for properties (2 allocs), and there is a 3-byte alloc for empty c4_String objects. The global symbol table is only cleaned up in debug mode, it's a once-only leak, so is the 3-byte empty string buffer.
So yes, there are up to 3 allocations that may never be cleaned up.
-jcw
_____________________________________________ Metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
-- Riccardo Cohen
Articque Les Roches 37230 Fondettes France web = http://www.articque.com tel: +33 02 47 49 90 49 fax: +33 02 47 49 91 49
_____________________________________________ Metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
