Reputation: 2824
I am building a Xamarin.Forms
application.
Every Page
when created has a reference to it's corresponding PageModel
.
Now for purposes such as showing Alerts, Navigation etc. I will need a reference of the Page
back in the PageModel
.
Will this cause issues while releasing memory? (As both objects will always have a non null reference pointing to each other?)
If Yes, can something like a weak reference be used to fix this?
Upvotes: 0
Views: 39
Reputation: 2165
It will be, sgen garbage collector also checks for object reachability.
Upvotes: 1