Tcl Source Code

Check-in [cd71aa687d]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the missing cleanup bits in INST_UNSET_ARRAY.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-a3309d01db
Files: files | file ages | folders
SHA1: cd71aa687d610659c0da4f5e76fdb6cb5f8ffa3a
User & Date: dgp 2015-07-18 05:27:00
Context
2015-07-18
05:52
[a3309d01db] Plug memleak in compiled [unset a($i)]. check-in: 41d3e42dda user: dgp tags: trunk
05:27
Add the missing cleanup bits in INST_UNSET_ARRAY. Closed-Leaf check-in: cd71aa687d user: dgp tags: bug-a3309d01db
02:39
merge trunk check-in: 5aa7992634 user: dgp tags: bug-a3309d01db
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclExecute.c.

4177
4178
4179
4180
4181
4182
4183



4184
4185
4186
4187
4188
4189
4190
		/*
		 * No nasty traces and element exists, so we can proceed to
		 * unset it. Might still not exist though...
		 */

		if (!TclIsVarUndefined(varPtr)) {
		    TclDecrRefCount(varPtr->value.objPtr);



		} else if (flags & TCL_LEAVE_ERR_MSG) {
		    goto slowUnsetArray;
		}
		varPtr->value.objPtr = NULL;
		TRACE_APPEND(("OK\n"));
		NEXT_INST_F(6, 1, 0);
	    } else if (!varPtr && !(flags & TCL_LEAVE_ERR_MSG)) {






>
>
>







4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
		/*
		 * No nasty traces and element exists, so we can proceed to
		 * unset it. Might still not exist though...
		 */

		if (!TclIsVarUndefined(varPtr)) {
		    TclDecrRefCount(varPtr->value.objPtr);
		    TclSetVarUndefined(varPtr);
		    TclClearVarNamespaceVar(varPtr);
		    TclCleanupVar(varPtr, arrayPtr);
		} else if (flags & TCL_LEAVE_ERR_MSG) {
		    goto slowUnsetArray;
		}
		varPtr->value.objPtr = NULL;
		TRACE_APPEND(("OK\n"));
		NEXT_INST_F(6, 1, 0);
	    } else if (!varPtr && !(flags & TCL_LEAVE_ERR_MSG)) {