Tcl Source Code

Check-in [a8a64455ae]
Login

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

Overview
Comment:Attempt at providing the missing instance squelcher.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | memleak
Files: files | file ages | folders
SHA3-256: a8a64455aef1535b26579ffff2d74c0d67b84fac9fe29eeccca1642ef43d022c
User & Date: dgp 2018-03-11 18:08:00.320
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
Unified Diff Ignore Whitespace 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;