# How to free Memory in HOOPS Exchange

**URL:** <https://forum.techsoft3d.com/t/how-to-free-memory-in-hoops-exchange/1460>\
**Category:** HOOPS Exchange\
**Tags:** knowledge-base, how-to, product-structure\
**Created:** [January 26, 2022, 5:00am UTC](https://forum.techsoft3d.com/t/how-to-free-memory-in-hoops-exchange/1460 "2022-01-26T05:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel.peragine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/gabriel.peragine/32/1535_2.png) [@gabriel.peragine](https://forum.techsoft3d.com/u/gabriel.peragine)\
**Post date:** [January 26, 2022, 5:00am UTC](https://forum.techsoft3d.com/t/how-to-free-memory-in-hoops-exchange/1460/1 "2022-01-26T05:00:00Z")

</div>

It all depends on the kind of object you want to free:

- If it’s part of some modelFile, then both of them will automatically be deleted at the same time (ie when the [A3DAsmModelFileDelete()](https://docs.techsoft3d.com/exchange/latest/api/A3DSDKStructure_8h.html#_CPPv421A3DAsmModelFileDeleteP15A3DAsmModelFile) function will be called) since the memory of PRC trees is self-managed.
- If it’s an independent object that is not part of any modelFile (ie it was generated with some XXXCreate() function) then it’s possible to call the [A3DEntityDelete()](https://docs.techsoft3d.com/exchange/latest/api/A3DSDKTools_8h.html?#_CPPv415A3DEntityDeleteP9A3DEntity) function to free it and all its potential children.
- If it’s an XXXData structure (eg [A3DAsmProductOccurrenceData](https://docs.techsoft3d.com/exchange/latest/api/structA3DAsmProductOccurrenceData.html)) then call the corresponding XXXGet function again (eg [A3DAsmProductOccurrenceGet](https://docs.techsoft3d.com/exchange/latest/api/A3DSDKStructure_8h.html#_CPPv426A3DAsmProductOccurrenceGetPK23A3DAsmProductOccurrenceP27A3DAsmProductOccurrenceData)) on it while specifying “NULL” as the first argument.

**See the related doc page:** [Building PRC — HOOPS Exchange 2023 documentation](https://docs.techsoft3d.com/exchange/latest/guide/basic_operations/building_prc.html)
