Page 1 of 1

[C++] ObservableCollection Clear() in Noesis 2.1

Posted: 22 Mar 2018, 12:31
by realesmedia
Have a collection in class:
Noesis::Ptr<Noesis::ObservableCollection<BasePropertyComponent>> properties = *new Noesis::ObservableCollection<BasePropertyComponent>();
In Noesis 2.0 we have to use properties->Clear() for destroy objects.

In Noesis 2.1 Clear() method doesn't call destructor, but next code works:
while (properties->Count()) {
    properties->RemoveAt(0);
}

Re: [C++] ObservableCollection Clear() in Noesis 2.1

Posted: 23 Mar 2018, 12:30
by realesmedia
Select item in collection, then Clear() collection. Have no destructor call for selected item.

Re: [C++] ObservableCollection Clear() in Noesis 2.1

Posted: 27 Mar 2018, 11:43
by sfernandez
This is a bug, could you please add a ticket in our butracker?