- This topic has 1 reply, 2 voices, and was last updated 6 years, 4 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Hi,
In my applicatie I have a:
FSomeList : TObjectList<TSomeObject>;
In one method I try to fill this field like this.
FSomeList := Use.AsObject<TObjectList<TSomeObject>>(FSmartClient.Service.GetSomeResult);
This works fine and the list is filled as expected, but when I want to try to access the FSomeList from another method the list is empty.
I don’t really understand what happens here? It looks like FSomeList is just a reference to the result from the smartclient and that it’s a scope thing. How can I make this work?
Thanks in advance (and thanks for the other answer)
Luigi
Hi,
kbmMW keeps ownership returned result and thus cleans it up after when out of scope. If you want to be handed the ownership (and responsibility for cleaning it up), use:
FSomeList := Use.AsMyObject<TObjectList<TSomeObject>>(FSmartClient.Service.GetSomeResult);