Community
Participate
Working Groups
The Windows#setDefaultModalParent() has application scope as it stores the given argument in a static variable. This may cause a) a memory leak as the argument is likely to hold a shell that should be released upon session termination but is held forever in said static field b) unwanted side effects as shells are mixed across session boundaries
Created attachment 191411 [details] Proposed patch This patch puts the provider set by Window#setDefaultModalParent into the session store.
Hi Ivan, I just had a look at your patch. I think the defaultModalParent should also be removed because a) it is useless as it is always null b) it is static and there must not be any static IShellProvider
Hi Rüdiger, why do you think that the defaultModalParent is always null - it is initialized in the declaration? Yes, it is static, but it uses Display.getCurrent().getShells() to get the session aware modalChild.
Ups, I overlooked this - thought it was initialized with null, don't ask me why... Sorry for the noise.
Applied patch to CVS HEAD.