summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index e8f9757..292e9e0 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -4,12 +4,10 @@
* This file contains the method call chain management code for the
* object-system core.
*
- * Copyright (c) 2005-2008 by Donal K. Fellows
+ * Copyright (c) 2005-2011 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: tclOOCall.c,v 1.15 2009/09/30 03:11:26 dgp Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -103,8 +101,11 @@ void
TclOODeleteContext(
CallContext *contextPtr)
{
+ register Object oPtr = contextPtr->oPtr;
+
TclOODeleteChain(contextPtr->callPtr);
- TclStackFree(contextPtr->oPtr->fPtr->interp, contextPtr);
+ TclStackFree(oPtr->fPtr->interp, contextPtr);
+ DelRef(oPtr);
}
/*
@@ -1089,6 +1090,7 @@ TclOOGetCallContext(
returnContext:
contextPtr = TclStackAlloc(oPtr->fPtr->interp, sizeof(CallContext));
contextPtr->oPtr = oPtr;
+ AddRef(oPtr);
contextPtr->callPtr = callPtr;
contextPtr->skip = 2;
contextPtr->index = 0;