7vikram7
7vikram7

Reputation: 2824

Page has a reference to Page Model, PageModel has a reference back to the page. Will memory be released?

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

Answers (1)

Related Questions