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 just call again the corresponding XXXGet function (eg A3DAsmProductOccurrenceGet) on it while specifying “NULL” as first argument.
See also the related doc page: https://docs.techsoft3d.com/exchange/latest/build/building_prc_7.html