From 0c0569fb2a48a95d0c1f69234548ddd7ec32b59b Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 29 Apr 2015 20:57:47 +0100 Subject: More bits on event emission during dispose. Change-Id: I89b6735bca19eec1ccc1d14cd3c35e88fd36d51f --- vcl/README.lifecycle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vcl') diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle index daa5fbb07eb2..7c2ceb218797 100644 --- a/vcl/README.lifecycle +++ b/vcl/README.lifecycle @@ -284,3 +284,19 @@ ways and often both. In simple cases, if we allocate the widget with VclPtrInstance or VclPtr::Create - then we need to disposeAndClear it too. +** Event / focus / notification ordering + + In the old world, a large amount of work was done in the + ~Window destructor that is now done in Window::dispose. + + Since those Windows were in the process of being destroyed + themselves, their vtables were adjusted to only invoke Window + methods. In the new world, sub-classed methods such as + PreNotify, GetFocus, LoseFocus and others are invoked all down + the inheritance chain from children to parent, during dispose. + + The easiest way to fix these is to just ensure that these + cleanup methods, especially LoseFocus continue to work even + on disposed Window sub-class instances. + + -- cgit