Browse Source

minor track-memory-usage bugs

David Rose 21 years ago
parent
commit
7d829390e7
2 changed files with 6 additions and 2 deletions
  1. 2 0
      panda/src/express/memoryInfo.cxx
  2. 4 2
      panda/src/express/memoryUsage.cxx

+ 2 - 0
panda/src/express/memoryInfo.cxx

@@ -108,6 +108,8 @@ determine_dynamic_type() {
           << " and make sure that all are being initialized.\n";
         _dynamic_type = _static_type;
         _flags &= ~F_reconsider_dynamic_type;
+
+        nassert_raise("Unregistered type.");
         return;
       }
 

+ 4 - 2
panda/src/express/memoryUsage.cxx

@@ -377,9 +377,11 @@ MemoryUsage() {
 
   // count-memory-usage is a much lighter-weight version, and only
   // tracks the total memory allocation.  However, it only works for
-  // certain build environments.
+  // certain build environments (in particular, only in an Opt1 or
+  // Opt2 build on Windows).
 #if defined(WIN32_VC) && defined(_DEBUG)
-  _count_memory_usage = config_express.GetBool("count-memory-usage", false);
+  _count_memory_usage = config_express.GetBool("count-memory-usage", 
+                                               _track_memory_usage);
 #else
   _count_memory_usage = false;
 #endif