From: <ni...@in...> - 2001-04-17 04:35:20
|
This one has nothing to do with C -> C++ interoperability. % diff -u ../prefs.cpp prefs.cpp --- ../prefs.cpp Fri Feb 2 20:52:57 2001 +++ prefs.cpp Tue Apr 17 14:22:01 2001 @@ -125,6 +125,7 @@ delete p; p = next; } + the_prefs = NULL; } % It is in the function PrefsExit(). It goes through and deletes all preferences items, but leaves the pointer to the head of the linked list. This is a re-entrancy problem which you will only encounter if you do something like: ... PrefsInit(argc,argv); ... { PrefsExit(); PrefsInit(argc,argv); } which I had need to do in a preferences "Reset" function. -- | Nigel Pearson, ni...@in... | "Reality is that which, | | Telstra NW-D, Sydney, Australia. | when you stop believing | | Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." | | Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' | |