Index: generic/xotcl.c =================================================================== diff -u -rf3cbadd6d76459cc00032877fa905bb618e9f780 -r77531e5530970d3f46f6b7d9785d02e32df7ae96 --- generic/xotcl.c (.../xotcl.c) (revision f3cbadd6d76459cc00032877fa905bb618e9f780) +++ generic/xotcl.c (.../xotcl.c) (revision 77531e5530970d3f46f6b7d9785d02e32df7ae96) @@ -11814,6 +11814,9 @@ if (result != TCL_OK) { obj->flags |= XOTCL_CMD_NOT_FOUND; fprintf(stderr, "*** dealloc failed for %p %s flags %.6x, retry\n", obj, objectName(obj), obj->flags); + /* In case, the call of the dealloc method has failed above (e.g. NS_DYING), + * we have to call dealloc manually, otherwise we have a memory leak + */ result = DoDealloc(interp, obj); } return result;