当前位置: 首页>>代码示例>>Java>>正文


Java Disposer.addRecord方法代码示例

本文整理汇总了Java中sun.java2d.Disposer.addRecord方法的典型用法代码示例。如果您正苦于以下问题:Java Disposer.addRecord方法的具体用法?Java Disposer.addRecord怎么用?Java Disposer.addRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.java2d.Disposer的用法示例。


在下文中一共展示了Disposer.addRecord方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
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));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CGLGraphicsConfig.java

示例2: X11GraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
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));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:X11GraphicsConfig.java

示例3: main

import sun.java2d.Disposer; //导入方法依赖的package包/类
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");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:25,代码来源:WindowsLeak.java

示例4: CGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
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);
    refPConfigInfo(pConfigInfo);
    // 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));
}
 
开发者ID:JetBrains,项目名称:jdk8u_jdk,代码行数:17,代码来源:CGLGraphicsConfig.java

示例5: CGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
protected 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));

    // 7200762: Workaround a deadlock by caching the value
    //          A fix for JDK 8 will remove the workaround
    this.cachedMaxTextureSize = _getMaxTextureSize();
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:20,代码来源:CGLGraphicsConfig.java

示例6: WGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
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()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WGLGraphicsConfig.java

示例7: WGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
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));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:WGLGraphicsConfig.java

示例8: WGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
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()));
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:16,代码来源:WGLGraphicsConfig.java

示例9: ownedInit

import sun.java2d.Disposer; //导入方法依赖的package包/类
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));
}
 
开发者ID:ZhaoX,项目名称:jdk-1.7-annotated,代码行数:11,代码来源:Window.java

示例10: CGLGraphicsConfig

import sun.java2d.Disposer; //导入方法依赖的package包/类
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));
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:16,代码来源:CGLGraphicsConfig.java

示例11: JPEGImageReader

import sun.java2d.Disposer; //导入方法依赖的package包/类
public JPEGImageReader(ImageReaderSpi originator) {
    super(originator);
    structPointer = initJPEGImageReader();
    disposerRecord = new JPEGReaderDisposerRecord(structPointer);
    Disposer.addRecord(disposerReferent, disposerRecord);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:JPEGImageReader.java

示例12: JPEGImageWriter

import sun.java2d.Disposer; //导入方法依赖的package包/类
public JPEGImageWriter(ImageWriterSpi originator) {
    super(originator);
    structPointer = initJPEGImageWriter();
    disposerRecord = new JPEGWriterDisposerRecord(structPointer);
    Disposer.addRecord(disposerReferent, disposerRecord);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:JPEGImageWriter.java

示例13: WPrinterJob

import sun.java2d.Disposer; //导入方法依赖的package包/类
public WPrinterJob()
{
    Disposer.addRecord(disposerReferent,
                       handleRecord = new HandleRecord());
    initAttributeMembers();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:WPrinterJob.java


注:本文中的sun.java2d.Disposer.addRecord方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。