MCPcopy Create free account
hub / github.com/assimp/assimp / aiReleaseImport

Function aiReleaseImport

code/Common/Assimp.cpp:281–301  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Releases all resources associated with the given import process.

Source from the content-addressed store, hash-verified

279// ------------------------------------------------------------------------------------------------
280// Releases all resources associated with the given import process.
281void aiReleaseImport(const aiScene *pScene) {
282 if (!pScene) {
283 return;
284 }
285
286 ASSIMP_BEGIN_EXCEPTION_REGION();
287
288 // find the importer associated with this data
289 const ScenePrivateData *priv = ScenePriv(pScene);
290 if (!priv || !priv->mOrigImporter) {
291 delete pScene;
292 } else {
293 // deleting the Importer also deletes the scene
294 // Note: the reason that this is not written as 'delete priv->mOrigImporter'
295 // is a suspected bug in gcc 4.4+ (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52339)
296 Importer *importer = priv->mOrigImporter;
297 delete importer;
298 }
299
300 ASSIMP_END_EXCEPTION_REGION(void);
301}
302
303// ------------------------------------------------------------------------------------------------
304ASSIMP_API const aiScene *aiApplyPostProcessing(const aiScene *pScene,

Callers 4

DeleteAssetFunction · 0.85
mainFunction · 0.85
aiApplyPostProcessingFunction · 0.85

Calls 1

ScenePrivFunction · 0.85

Tested by

no test coverage detected