+ if (old_obj == 0 && obj == 0) {
+ return;
+ }
+
+ Glib::Threads::Mutex::Lock guard (the_lock());
+
+ if (is_interesting_object (old_obj) || is_interesting_object (obj)) {
+ if (debug_out) {
+ cerr << "ASSIGN SWAPS " << old_obj << " & " << obj << endl;
+ }
+ }
+
+ if (is_interesting_object (old_obj)) {
+ if (debug_out) {
+ cerr << "\tlost old sp @ " << sp << " for " << old_obj << " UC = " << old_use_count << " now for " << obj << " UC = " << new_use_count
+ << " (total sp's = " << sptrs().size() << ')' << endl;
+ }
+ PointerMap::iterator x = sptrs().find (sp);
+
+ if (x != sptrs().end()) {
+ sptrs().erase (x);
+ if (debug_out) {
+ cerr << "\tRemoved (by assignment) sp for " << old_obj << " @ " << sp << " UC = " << old_use_count << " (total sp's = " << sptrs().size() << ')' << endl;
+ }
+ }
+ }
+