Java Code Examples for sun.java2d.Disposer#addRecord()
The following examples show how to use
sun.java2d.Disposer#addRecord() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CGLGraphicsConfig.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt, long configInfo, int maxTextureSize, ContextCapabilities oglCaps) { super(device); this.pixfmt = pixfmt; this.pConfigInfo = configInfo; this.oglCaps = oglCaps; this.maxTextureSize = maxTextureSize; context = new OGLContext(OGLRenderQueue.getInstance(), this); // add a record to the Disposer so that we destroy the native // CGLGraphicsConfigInfo data when this object goes away Disposer.addRecord(disposerReferent, new CGLGCDisposerRecord(pConfigInfo)); }
Example 2
Source File: WindowsLeak.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { Robot r = new Robot(); for (int i = 0; i < 100; i++) { Frame f = new Frame(); f.pack(); f.dispose(); } r.waitForIdle(); Disposer.addRecord(new Object(), () -> disposerPhantomComplete = true); while (!disposerPhantomComplete) { Util.generateOOME(); } Vector<WeakReference<Window>> windowList = (Vector<WeakReference<Window>>) AppContext.getAppContext().get(Window.class); if (windowList != null && !windowList.isEmpty()) { throw new RuntimeException("Test FAILED: Window list is not empty: " + windowList.size()); } System.out.println("Test PASSED"); }
Example 3
Source File: X11GraphicsConfig.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected X11GraphicsConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer) { this.screen = device; this.visual = visualnum; this.doubleBuffer = doubleBuffer; this.depth = depth; this.colormap = colormap; init (visualnum, screen.getScreen()); // add a record to the Disposer so that we destroy the native // AwtGraphicsConfigData when this object goes away (i.e. after a // display change event) long x11CfgData = getAData(); Disposer.addRecord(disposerReferent, new X11GCDisposerRecord(x11CfgData)); }
Example 4
Source File: CGLGraphicsConfig.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt, long configInfo, ContextCapabilities oglCaps) { super(device); this.pixfmt = pixfmt; this.pConfigInfo = configInfo; this.oglCaps = oglCaps; context = new OGLContext(OGLRenderQueue.getInstance(), this); // add a record to the Disposer so that we destroy the native // CGLGraphicsConfigInfo data when this object goes away Disposer.addRecord(disposerReferent, new CGLGCDisposerRecord(pConfigInfo)); }
Example 5
Source File: CGLGraphicsConfig.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt, long configInfo, ContextCapabilities oglCaps) { super(device); this.pixfmt = pixfmt; this.pConfigInfo = configInfo; this.oglCaps = oglCaps; context = new OGLContext(OGLRenderQueue.getInstance(), this); // add a record to the Disposer so that we destroy the native // CGLGraphicsConfigInfo data when this object goes away Disposer.addRecord(disposerReferent, new CGLGCDisposerRecord(pConfigInfo)); }
Example 6
Source File: WGLGraphicsConfig.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum, long configInfo, ContextCapabilities oglCaps) { super(device, visualnum); this.pConfigInfo = configInfo; this.oglCaps = oglCaps; context = new OGLContext(OGLRenderQueue.getInstance(), this); // add a record to the Disposer so that we destroy the native // WGLGraphicsConfigInfo data when this object goes away Disposer.addRecord(disposerReferent, new WGLGCDisposerRecord(pConfigInfo, device.getScreen())); }
Example 7
Source File: Window.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
private void ownedInit(Window owner) { this.parent = owner; if (owner != null) { owner.addOwnedWindow(weakThis); } // Fix for 6758673: this call is moved here from init(gc), because // WindowDisposerRecord requires a proper value of parent field. Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this)); }
Example 8
Source File: WGLGraphicsConfig.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum, long configInfo, ContextCapabilities oglCaps) { super(device, visualnum); this.pConfigInfo = configInfo; this.oglCaps = oglCaps; context = new OGLContext(OGLRenderQueue.getInstance(), this); // add a record to the Disposer so that we destroy the native // WGLGraphicsConfigInfo data when this object goes away Disposer.addRecord(disposerReferent, new WGLGCDisposerRecord(pConfigInfo, device.getScreen())); }
Example 9
Source File: JPEGImageWriter.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 10
Source File: WPrinterJob.java From hottub with GNU General Public License v2.0 | 4 votes |
public WPrinterJob() { Disposer.addRecord(disposerReferent, handleRecord = new HandleRecord()); initAttributeMembers(); }
Example 11
Source File: JPEGImageWriter.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 12
Source File: JPEGImageWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 13
Source File: WPrinterJob.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public WPrinterJob() { Disposer.addRecord(disposerReferent, handleRecord = new HandleRecord()); initAttributeMembers(); }
Example 14
Source File: WPrinterJob.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public WPrinterJob() { Disposer.addRecord(disposerReferent, handleRecord = new HandleRecord()); initAttributeMembers(); }
Example 15
Source File: JPEGImageWriter.java From JDKSourceCode1.8 with MIT License | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 16
Source File: JPEGImageWriter.java From Bytecoder with Apache License 2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 17
Source File: WPrinterJob.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public WPrinterJob() { Disposer.addRecord(disposerReferent, handleRecord = new HandleRecord()); initAttributeMembers(); }
Example 18
Source File: JPEGImageWriter.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 19
Source File: JPEGImageWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public JPEGImageWriter(ImageWriterSpi originator) { super(originator); structPointer = initJPEGImageWriter(); disposerRecord = new JPEGWriterDisposerRecord(structPointer); Disposer.addRecord(disposerReferent, disposerRecord); }
Example 20
Source File: WPrinterJob.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public WPrinterJob() { Disposer.addRecord(disposerReferent, handleRecord = new HandleRecord()); initAttributeMembers(); }