On 12/05/2016 at 07:02, xxxxxxxx wrote:
Hello.
First of all, it is advised in the forum that to store a pointer to any Cinema4D object, a BaseLink has to be used. So I need a data structure with BaseLinks to BaseObjects.
I also need to copy the contents of this data structure without losing the references to the original base objects. I have tried using BaseLinkArray, but it's desctructor frees the objects (I don't want that).
I have also tried using BaseArray<BaseLink*> :
AutoAlloc<BaseLink> temp_link;
temp_link->SetLink(any_base_object);
my_base_array->Append(temp_link);
but it is wrong because the temp_link gets destroyed at the end of the block, so right after, the my_base_array is invalid.
What can I do to solve this problem ?
Thank you very much for your time.