Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Thoughts on how to modify this code so the WeakEventHandler isn't GC'd?

$
0
0

So I've been tracking down an issue where a ReactiveList stops notifying the ListView that items are being added... An ObservableColelction is able to continue working fine but a ReactiveList doesn't..

I'm fairly positive I tracked this down to the WeakEventHandler ReactiveList from (RxUI) uses to do it's eventing when ran on iOS/Android

Here's a conversation I've been having over there
https://github.com/reactiveui/ReactiveUI/issues/806

And here's a version of my test application where I've removed ReactiveUI and just added in the WeakEventHandler
https://github.com/PureWeen/XamarinFormsiOSListViewReactiveList/tree/removedreactiveui

The WeakEventHandler always gets GC'd around 7 or 8 items in

02-26 13:43:31.429 D/dalvikvm( 2473): GC_EXPLICIT freed 81K, 4% free 3673K/3816K, paused 3ms+1ms, total 13ms
02-26 13:43:31.429 D/Mono    ( 2473): GC_OLD_BRIDGE num-objects 95 num_hash_entries 104 sccs size 104 init 0.00ms df1 0.69ms sort 0.04ms dfs2 1.55ms setup-cb 0.19ms free-data 0.18ms links 9/9/9/1 dfs passes 208/113
02-26 13:43:31.429 D/Mono    ( 2473): GC_MINOR: (Nursery full) pause 24.16ms, total 24.64ms, bridge 17.99ms promoted 896K major 1152K los 8K

I've tried moving the lists to being instantiated on the class and not using an anonymous delegate but it still does the same thing...


Viewing all articles
Browse latest Browse all 58056

Trending Articles