Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Dynamic Linking Woes w/ Destructor
  RSS 2.0 ATOM  
2 pages: 1.2 first

Dynamic Linking Woes w/ Destructor
Rate this thread
 
50012
 
Permlink of this thread  
avatar
  • keres
  • Posted: 01 December 2010 06:03 AM

I’m still slightly confused by this. Why does my program crash at the very last brace of my very last destructor, and not at the end of when I destroy the FBX manager?



Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

Destructors for global/static variables are called at program termination.

Author: Doug Rogers

Replied: 01 December 2010 06:06 AM  
avatar
  • keres
  • Posted: 01 December 2010 09:59 AM

I found out where the problem was going on, and fixed it. :D I forgot to instantiate a pointer of mine to NULL, so the destructor deleted it even after checking if it had a value. I do not know why I encountered this problem only at program termination, and not when the object was being deleted. Very strange.

Seriously I feel completely embarrassed now :x thank you for your help regardless.



Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

No problem.  I’m glad you got it working.  Sometimes just discussing bugs leads to finding them and learning new things.

Author: Doug Rogers

Replied: 01 December 2010 12:00 PM  
avatar
  • keres
  • Posted: 01 December 2010 12:57 PM

So very true! Remember kids, always initialize pointers as NULL, or else! :)

Thank you for your help, Doug.



Replies: 0
2 pages: 1.2 first