Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <vlCore/Object.hpp>
00033 #include <vlCore/Log.hpp>
00034 #include <vlCore/Say.hpp>
00035
00036 using namespace vl;
00037
00038
00039
00040
00041 #if VL_DEBUG_LIVING_OBJECTS
00042 std::set< Object* > *Object::mDebug_LivingObjects = NULL;
00043 #endif
00044
00045 Object::~Object()
00046 {
00047 if (mReferenceCount && !automaticDelete())
00048 Log::bug(Say(
00049 "Object '%s' is being deleted having still %n references! Pissible causes:\n"
00050 "- illegal use of the 'delete' operator on an Object. Use ref<> instead.\n"
00051 "- explicit call to Object::incReference().\n"
00052 ) << mObjectName << mReferenceCount );
00053
00054 #if VL_DEBUG_LIVING_OBJECTS
00055 debug_living_objects()->erase(this);
00056 #endif
00057 }
00058