Index: generic/nsf.c =================================================================== diff -u -r0946e13d87bd5400bf785f35f6691ecb538d5566 -r6adee09c9a76dce3a29782d40c04d0ae7e01664d --- generic/nsf.c (.../nsf.c) (revision 0946e13d87bd5400bf785f35f6691ecb538d5566) +++ generic/nsf.c (.../nsf.c) (revision 6adee09c9a76dce3a29782d40c04d0ae7e01664d) @@ -745,8 +745,8 @@ static void NsfCommandRelease(Tcl_Command cmd) { /*fprintf(stderr,"NsfCommandRelease %p\n", cmd);*/ - TclCleanupCommandMacro((Command *)cmd); MEM_COUNT_FREE("command.refCount", cmd); + TclCleanupCommandMacro((Command *)cmd); } /*********************************************************************** @@ -3009,7 +3009,7 @@ #if defined(VAR_RESOLVER_TRACE) int flags = var ? ((Var *)var)->flags : 0; fprintf(stderr,"CompiledColonVarFetch var '%s' var %p flags = %.4x dead? %.4x\n", - ObjStr(resVarInfo->nameObj), var, flags, flags&VAR_DEAD_HASH); + ObjStr(resVarInfo->nameObj), var, flags, flags & VAR_DEAD_HASH); #endif /* @@ -3581,6 +3581,7 @@ static void NSNamespacePreserve(Tcl_Namespace *nsPtr) { assert(nsPtr); + MEM_COUNT_ALLOC("NSNamespace", nsPtr); Tcl_Namespace_refCount(nsPtr)++; } /* @@ -3601,13 +3602,14 @@ NSNamespaceRelease(Tcl_Namespace *nsPtr) { assert(nsPtr); + MEM_COUNT_FREE("NSNamespace", nsPtr); Tcl_Namespace_refCount(nsPtr)--; if (Tcl_Namespace_refCount(nsPtr) == 0 && (Tcl_Namespace_flags(nsPtr) & NS_DEAD)) { /* * The namespace refCount has reached 0, we have to free * it. unfortunately, NamespaceFree() is not exported */ - /* fprintf(stderr, "HAVE TO FREE %p\n", nsPtr); */ + fprintf(stderr, "HAVE TO FREE %p\n", nsPtr); /*NamespaceFree(nsPtr);*/ ckfree(nsPtr->fullName); ckfree(nsPtr->name); @@ -11999,15 +12001,17 @@ methodNameLength = 1 + cscPtr->objc - oc; nobjc = objc + methodNameLength; nobjv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *) * nobjc); + MEM_COUNT_ALLOC("nextArgumentVector", nobjv); /* - * copy the ensemble name + * copy the ensemble path name */ memcpy((char *)nobjv, cscPtr->objv, sizeof(Tcl_Obj *) * methodNameLength); } else { methodNameLength = 1; nobjc = objc + methodNameLength; nobjv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *) * nobjc); + MEM_COUNT_ALLOC("nextArgumentVector", nobjv); /* * copy the method name */ @@ -12084,6 +12088,7 @@ if (nobjv) { DECR_REF_COUNT(nobjv[0]); + MEM_COUNT_FREE("nextArgumentVector", nobjv); ckfree((char *)nobjv); }