Tcl Source Code

Check-in [a8a64455ae]
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:Attempt at providing the missing instance squelcher.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | memleak
Files: files | file ages | folders
SHA3-256: a8a64455aef1535b26579ffff2d74c0d67b84fac9fe29eeccca1642ef43d022c
User & Date: dgp 2018-03-11 18:08:00
Context
2018-03-11
21:14
Prevent leaks of the Object structs of oo::object and oo::class. check-in: 722088eb1f user: dgp tags: memleak
18:08
Attempt at providing the missing instance squelcher. check-in: a8a64455ae user: dgp tags: memleak
12:14
plug memleak of constructed package requirement. check-in: 70bb82f088 user: dgp tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to generic/tclOO.c.

930
931
932
933
934
935
936

937
938















939
940
941
942
943
944
945
    if (clsPtr->filters.num) {
	Tcl_Obj *filterObj;

	FOREACH(filterObj, clsPtr->filters) {
	    TclDecrRefCount(filterObj);
	}
	ckfree(clsPtr->filters.list);

	clsPtr->filters.num = 0;
    }
















    /*
     * Squelch our metadata.
     */

    if (clsPtr->metadataPtr != NULL) {
	Tcl_ObjectMetadataType *metadataTypePtr;






>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
    if (clsPtr->filters.num) {
	Tcl_Obj *filterObj;

	FOREACH(filterObj, clsPtr->filters) {
	    TclDecrRefCount(filterObj);
	}
	ckfree(clsPtr->filters.list);
	clsPtr->filters.list = NULL;
	clsPtr->filters.num = 0;
    }

    /*
     * Squelch our instances.
     */

    if (clsPtr->instances.num) {
	Object *oPtr;

	FOREACH(oPtr, clsPtr->instances) {
	    TclOODecrRefCount(oPtr);
	}
	ckfree(clsPtr->instances.list);
	clsPtr->instances.list = NULL;
	clsPtr->instances.num = 0;
    }

    /*
     * Squelch our metadata.
     */

    if (clsPtr->metadataPtr != NULL) {
	Tcl_ObjectMetadataType *metadataTypePtr;