[Cmake-commits] [cmake-commits] king committed cmTarget.cxx 1.204 1.205

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Mar 4 13:51:29 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv946/Source

Modified Files:
	cmTarget.cxx 
Log Message:
BUG: Fix memory leak when cmTarget instances are assigned.  We really need to get rid of global targets and their associated assignments.


Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.204
retrieving revision 1.205
diff -C 2 -d -r1.204 -r1.205
*** cmTarget.cxx	2 Mar 2008 21:37:34 -0000	1.204
--- cmTarget.cxx	4 Mar 2008 18:51:27 -0000	1.205
***************
*** 3544,3548 ****
--- 3544,3550 ----
    // we can make a sweep to remove that, this copy constructor avoids
    // allowing the resources (Internals) to be copied.
+   cmTargetInternals* oldPointer = this->Pointer;
    this->Pointer = new cmTargetInternals;
+   delete oldPointer;
    return *this;
  }



More information about the Cmake-commits mailing list