-
- realesmedia
- Posts: 85
- Joined:
Re: [C++] Clear resources on collection item remove.
Wait for another sample. We've got cool stuff to show.
-
- realesmedia
- Posts: 85
- Joined:
Re: [C++] Clear resources on collection item remove.
One more sample.
Modified version. Changes:
* Added UserControl with data binding;
* Button Click event process all items manually:
Normal case:
Run app, select item and click clear button: all destructors calls.
Bug case:
Run app, select item, select second tab, click clear button: destructor for selected item didn't call. And it is in case when we manually remove item.
If I use TextBlock instead of UserControl, bug cannot be reproduced.
Modified version. Changes:
* Added UserControl with data binding;
* Button Click event process all items manually:
Code: Select all
while (m_first_ctx->Count()) {
m_first_ctx->RemoveAt(0);
}
m_first_ctx->Clear(); //< have no effect
Run app, select item and click clear button: all destructors calls.
Bug case:
Run app, select item, select second tab, click clear button: destructor for selected item didn't call. And it is in case when we manually remove item.
If I use TextBlock instead of UserControl, bug cannot be reproduced.
- Attachments
-
- Src.zip
- (2.45 KiB) Downloaded 77 times
Who is online
Users browsing this forum: No registered users and 1 guest