Solved Removing IsolateObjects document

I am using IsolateObjects to copy an object into a separate document in order to render a preview of the isolated object.

The documentation mentions "The caller owns the pointed document."
Do I simply need to perform a BaseDocument::Free on the obtained document?
Or do I need to call KillDocument?

hi,

yes, KillDocument is not necessary in that case.

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

I was reading the original R20 documentation, when the above question popped up.
Luckily, the latest online SDK documentation contains a BaseDocument Manual, where it mentions (if I understand it correctly) that KillDocument is to be called to remove a BaseDocument from the list.
Which means KillDocument should only be used if a BaseDocument was created and inserted in the list (via InsertBaseDocument).

So, as long as I use IsolateObjects without performing an InsertBaseDocument I should be fine with calling BaseDocument::Free to free the obtained basedocument.
If I perform an IsolateObjects and subsequently call InsertBaseDocument then I should use KillDocument.
Correct?

hi,

yes, KillDocument is not necessary in that case.

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer