Index: generic/xotclStack85.c =================================================================== diff -u -r8eb2c3e68f127d641d0c004332e1bd057d5654dd -rf51bd5a29fc392a741fdf61589e43c5cb5755c28 --- generic/xotclStack85.c (.../xotclStack85.c) (revision 8eb2c3e68f127d641d0c004332e1bd057d5654dd) +++ generic/xotclStack85.c (.../xotclStack85.c) (revision f51bd5a29fc392a741fdf61589e43c5cb5755c28) @@ -343,6 +343,7 @@ return NULL; } +static void XOTclCleanupObject(XOTclObject *object); /* * Pop any callstack entry that is still alive (e.g. * if "exit" is called and we were jumping out of the @@ -421,17 +422,26 @@ fprintf(stderr, "POP csc=%p, obj %s method %s\n", cscPtr, objectName(object), Tcl_GetCommandName(interp, cscPtr->cmdPtr)); #endif + /* + tracking activations of objects + */ object->activationCount --; /*fprintf(stderr, "decr activationCount for %s to %d cscPtr->cl %p\n", objectName(cscPtr->self), cscPtr->self->activationCount, cscPtr->cl);*/ if (object->activationCount < 1 && object->flags & XOTCL_DESTROY_CALLED && allowDestroy) { CallStackDoDestroy(interp, object); - } else if (!allowDestroy) { + } +#if defined(OBJDELETION_TRACE) + else if (!allowDestroy) { fprintf(stderr,"checkFree %p %s\n",object, objectName(object)); } -#if 1 +#endif + + /* + tracking activations of classes + */ if (cscPtr->cl) { Namespace *nsPtr = cscPtr->cmdPtr ? ((Command *)(cscPtr->cmdPtr))->nsPtr : NULL; @@ -446,9 +456,12 @@ if (object->activationCount < 1 && object->flags & XOTCL_DESTROY_CALLED && allowDestroy) { CallStackDoDestroy(interp, object); - } else if (!allowDestroy) { + } +#if defined(OBJDELETION_TRACE) + else if (!allowDestroy) { fprintf(stderr,"checkFree %p %s\n",object, objectName(object)); } +#endif if (nsPtr) { nsPtr->refCount--; @@ -468,7 +481,7 @@ /*fprintf(stderr, "CallStackPop done\n");*/ } -#endif + } #endif /* TCL85STACK */