I recently ran into the same problem and managed to find a solution. Here I discovered who knows that this can help you.
In our RCP run, there is a call to PlatformUI.createDisplay () in our Application class, which connects to a call to Workbench.createDisplay (). The exact point at which the debug settings required by Sleak are correctly read and set.
What happened to our software was that a call to Display.getDefault () was made BEFORE calling the PlatformUI.createDisplay () platform. This caused the creation of a new Display object, which was set by default. This creature did not read or set debugging parameters because it happened in a different way.
By the time our code got into the PlatformUI.createDisplay () call, it had not actually created a new Display. Instead, it returned the previously created, not debugged. Thus, the lead Sleak warns that "the device does not monitor the distribution of resources."
Adding a breakpoint in the Display.register method helped us determine the beginning of an early creation and change it correctly.
You may not have written the createDisplay () call to your code, but I'm pretty sure there is somewhere because every platform needs a Display.
Mario marinato
source share