Cleaning up and shutting down
 
 
 

To free up memory, you should destroy all FBX objects once you no longer need them.

NoteAlways destroy an FBX object using itsdestroy()method. SDK manager will automatically update all references to that object that are stored in other FBX objects.

How LoadScene() destroys its FBX objects

 if(lImportOptions)
 {
 lImportOptions->Destroy();
 }
 lImporter->Destroy();

How SaveScene() destroys its FBX objects

 if(lExportOptions)
 {
 lExportOptions->Destroy();
 }
 lExporter->Destroy();

Destroying any remaining FBX objects

When you are finished with the FBX SDK, destroy the SDK Manager object. This will also destroy any remaining SDK objects managed by that instance of SDK Manager:

 pSdkManager->DestroyKFbxSdkManager();