Replies: 1 comment
-
| My guess why this was not detected earlier: GCs on controls will/should probably be quite short-living. They are, e.g., used for screenshotting with a very limited lifecycle, such that a control (including a shell) may not be disposed during the lifecycle of the GC on top of it. This could even be an implicit contract (GC must be disposed before the underlying drawable), but I don't think there is any explicit specification requiring it. So regarding your question: I don't think there is any proper way to detect that a (non-disposed) GC currently operates on an already disposed drawable. As mentioned above, I think this scenario is still not considered (explicitly or by accident). Maybe someone else knows if an explicit specification already exists. 
 | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is about a weird little thing that just came up in the GEF project. Let's consider the following simplified snippet:
Executing this code fails with a "Widget is disposed" error, because the containing Shell is disposed before the GC instance. However,
gc.isDisposed()still returnsfalse.My question: What is the expected behavior here? Is there a different way to check whether the GC object is still valid and how would I destroy it?
As a workaround, I can write this:
But this obviously doesn't answer the original question.
Beta Was this translation helpful? Give feedback.
All reactions