Memory_analyzer void safety question

8 views
Skip to first unread message

Anders Persson

unread,
Feb 28, 2014, 2:03:03 AM2/28/14
to eiffelst...@googlegroups.com
Hi

MA_WINDOW has a feature timer, which is detachable, and one attached_timer. For me the reason seem to be that one want to set the  timer to Void in the destroy feature. Is it necessary to set it to void in destroy? If so, why?

Regards

Anders

Emmanuel Stapf

unread,
Mar 4, 2014, 1:16:54 AM3/4/14
to eiffelst...@googlegroups.com
In general, when you see a feature like `attached_timer' in our code, this was an addition from the early stage of conversion to void-safety when we did not know better. Such routines should be removed and everywhere `timer' is used, we should simply check that it is set via an object test.

Now in this particular case, there is no need to set `timer' to Void, we just need to make sure it is not going to be triggered again. And thus we can make it attached and remove the `attached_timer' query.

Thanks,
Manu
Reply all
Reply to author
Forward
0 new messages