diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2013-08-02 19:41:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-08 17:31:10 (GMT) |
commit | f9bb20fe2bf1d9154a3244579ea84400912473b4 (patch) | |
tree | 7284afc04b2583fa0b5eaa8062498b7bd3c74bcc /Docs | |
parent | 05dad99f5a1ee781da52df0ccc61b236087bcd2d (diff) | |
download | CMake-f9bb20fe2bf1d9154a3244579ea84400912473b4.zip CMake-f9bb20fe2bf1d9154a3244579ea84400912473b4.tar.gz CMake-f9bb20fe2bf1d9154a3244579ea84400912473b4.tar.bz2 |
variable_watch: Don't share memory for callbacks
The command itself is owned by the cmMakefile class, but the
cmVariableWatch which holds a pointer to the cmVariableWatchCommand via
the client_data for the callback outlives the cmMakefile class in the Qt
GUI. This means that when the cmMakefile is destroyed, the variable
watch is still in effect, but with a stale pointer.
To fix this, each callback is now a separate entity completely and
doesn't rely on the command which spawned it at all.
An example CMakeLists.txt which demonstrates the issue (only displayed
in cmake-gui, so no tests can be written for it):
set(var 0)
variable_watch(var)
Diffstat (limited to 'Docs')
0 files changed, 0 insertions, 0 deletions