Improvement of TROUri.PathElements


(Alexander Pustotin) #1


I use RO SDK

  RO_VERSION = '';

We noticed that the property TROUri.PathElements behaves as a factory method instead of a property. As a client of the class I would expect that the TROUri object manages the instance created by its getter GetPathElements. Instead, the getter spawns a new object each time on accessing the property that could lead to memory leaks in client code.

IMO it would make sense either

  • keep the property “as is” but manage the internal object FPathElements
  • introduce a new method like CreatePathElements/ParsePathElements/… instead of the property


(EvgenyK) #2


this property isn’t used in RO itself.
I’ll remove it and create a new method that will return TArray<String> (array of string on old platform).
it should solve this issue.

(RemObjects) #3

Thanks, logged as bugs://82038

(RemObjects) #4

bugs://82038 got closed with status fixed.