After I put Tcl_Finalize method outside the loop, Memory
usage is not grow. Could you tell me how to add PURIFY to
makefile.vc, please? Tcl core is used in Windows and Win CE.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=80530
If you place that code in a loop,
do you see memory usage grow?
Or is this just a one-time "leak" ?
A "leak" of 2400 bytes looks like
the tclFreeObjList which isn't
released until process exit.
You can build Tcl with -DPURIFY
to avoid that issue, and to get
leak detection tools like Purify
to not falsely complain.
If a -DPURIFY build still shows
trouble, or you see continued
growth in a loop, comment again
here to keep this report from closing.
Logged In: NO
Memory usage grow.
for(int i=0; i<5; i++)
{
m_pInterp = Tcl_CreateInterp();
if (!Tcl_InterpDeleted(m_pInterp))
{
Tcl_DeleteInterp(m_pInterp);
Tcl_Finalize();
}
}
{1829} normal block at 0x007A95A8, 2400 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
{1402} normal block at 0x007A8C00, 2400 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
{975} normal block at 0x007A8258, 2400 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
{548} normal block at 0x007A78B0, 2400 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
{104} normal block at 0x007A6F08, 2400 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Object dump complete.
Logged In: YES
user_id=72656
Take out the finalize - that's not valid in the loop, it
should be outside the loop (you only finalize and init once).
Logged In: YES
user_id=1172204
After I put Tcl_Finalize method outside the loop, Memory
usage is not grow. Could you tell me how to add PURIFY to
makefile.vc, please? Tcl core is used in Windows and Win CE.
Thanks.
Logged In: NO
After I add PURIFY and rebuild the TCL. The memory leaks
have been removed. Thanks for your help