问题
I'm having trouble in testing an RCP application with Sleak because it does not display anything, it only shows the message "WARNING: Device is not tracking resource allocation". I've setup Sleak from this tutorial and I don't know what's wrong. Does anyone know a solution for this? Thanks in advance.
回答1:
Do you have the correct version? Can you see the sleak view in your RCP-application? If not make sure it's in your launch configuration. Also double check that you have set the
org.eclipse.ui/debug=true org.eclipse.ui/trace/graphics=true
correct in the tracing tab. There are properties with similar names.
回答2:
You can write
org.eclipse.ui.internal.misc.Policy.DEBUG_SWT_GRAPHICS = true;
org.eclipse.ui.internal.misc.Policy.DEBUG_SWT_DEBUG = true;
before
Display display = PlatformUI.createDisplay();
This will create in Workbench.createDisplay() method new Display with data tracking.
来源:https://stackoverflow.com/questions/2108430/sleak-swt-tool-device-is-not-tracking-resource-allocation