This is hard to explain.
Maybe then you could explain what you want to do?
In my example, I have list of objects whose addresses are linked via TTreeNode.Data.
That's clear, each tree item is mapped to some object via a pointer. This is a common usage scenario.
When a new node is selected, the new object is passed to the TIObject property of rtti controls.
That's not clear. Usually, the tree items pointer (TTreeNode.Data) is cast to the required class type and used. Why use RTTI?
Problem happens when I unload all the objects once --- free them all, and reload new set of objects. Normally the last item of the treeview is assigned as selected, and then its object's address should be passed to the TIobject property of rtti controls. The error happens at this moment.
By the way, I don't know if this applies to you, but when using objects via pointers, need to be careful. Need to clearly understand how they are created, who the pointers are passed to, and who destroys them.
* For example, can one and the same object be assigned to two different tree items? If so, then the second call to Free for the same pointer will cause an error.
* If these are components (TTimer, TButton, TForm), then they have their own "Owner" who frees them independently. And when the owner is destroyed, it will free all its components at once. An attempt to free a component after its owner will also result in an error.