NotchersMine
New member
- Joined
- Feb 23, 2017
- Messages
- 2
- Programming Experience
- 10+
Quick question (I hope):
Does a control's LayoutEngine component get re-instantiated on every call to Layout(), or does it remain throughout the lifetime of the control?
I am creating a custom LayoutEngine to be used for various controls. It has a number of fields that get assigned values on each Layout() call. I had created an internal helper class to store and set these values (this class was created for reasons that no longer apply), but I was thinking that if the LayoutEngine instance does not get instantiated/destroyed on each reference, I might keep on using the helper class and nullify it at the end of each layout to send it to the GC...
It's not that I have memory issues or anything, it's just that I suspect that Layout() is called for any container only a handful of times in the overall scheme of things, so why not keep it clean? Or is this point moot - should I even care?
Thanks in advance for any clarity you can provide on this!
Does a control's LayoutEngine component get re-instantiated on every call to Layout(), or does it remain throughout the lifetime of the control?
I am creating a custom LayoutEngine to be used for various controls. It has a number of fields that get assigned values on each Layout() call. I had created an internal helper class to store and set these values (this class was created for reasons that no longer apply), but I was thinking that if the LayoutEngine instance does not get instantiated/destroyed on each reference, I might keep on using the helper class and nullify it at the end of each layout to send it to the GC...
It's not that I have memory issues or anything, it's just that I suspect that Layout() is called for any container only a handful of times in the overall scheme of things, so why not keep it clean? Or is this point moot - should I even care?
Thanks in advance for any clarity you can provide on this!