How to free Memory in HOOPS Exchange

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() 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() function to free it and all its potential children.
  • If it’s an XXXData structure (eg A3DAsmProductOccurrenceData) then call the corresponding XXXGet function again (eg A3DAsmProductOccurrenceGet) on it while specifying “NULL” as the first argument.

See the related doc page: Building PRC — HOOPS Exchange 2023 documentation