-
After closing the parent page, the OnClose function of the child page is not called, and the instance of the child form is still in memory. How to clear it? |
Beta Was this translation helpful? Give feedback.
Answered by
canton7
Oct 10, 2022
Replies: 1 comment
-
You probably want TreatEffectSpotScanDetailsViewModel.ConductWith(this); In the parent VM ctor (assuming that the parent isn't a Conductor, which you haven't shown). That way the child will know when the parent is activated/deactivated/closed. That said, objects remaining in memory after they're no longer used is normal, and is how the .NET GC works. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zpccode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You probably want
In the parent VM ctor (assuming that the parent isn't a Conductor, which you haven't shown). That way the child will know when the parent is activated/deactivated/closed.
That said, objects remaining in memory after they're no longer used is normal, and is how the .NET GC works.