realesmedia
Topic Author
Posts: 85
Joined: 18 May 2016, 10:26

Re: [C++] Clear resources on collection item remove.

28 Mar 2018, 15:05

Wait for another sample. We've got cool stuff to show.
 
realesmedia
Topic Author
Posts: 85
Joined: 18 May 2016, 10:26

Re: [C++] Clear resources on collection item remove.

28 Mar 2018, 15:32

One more sample.
Modified version. Changes:
* Added UserControl with data binding;
* Button Click event process all items manually:
while (m_first_ctx->Count()) {
	m_first_ctx->RemoveAt(0);
}
m_first_ctx->Clear(); //< have no effect
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.
Attachments
Src.zip
(2.45 KiB) Downloaded 74 times

Who is online

Users browsing this forum: No registered users and 1 guest