------------------------------------------------------------------------------------------------ Releases all resources associated with the given import process.
| 279 | // ------------------------------------------------------------------------------------------------ |
| 280 | // Releases all resources associated with the given import process. |
| 281 | void 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 | // ------------------------------------------------------------------------------------------------ |
| 304 | ASSIMP_API const aiScene *aiApplyPostProcessing(const aiScene *pScene, |
no test coverage detected