Skip to content

Commit

Permalink
Font.dispose: remember stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Singer authored and tmssngr committed Mar 21, 2024
1 parent a9c8b23 commit 9d59c4e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ private void initTraits(int style, NSFont systemFont) {
}
}

public Throwable disposeStackTrace;

@Override
public void dispose() {
disposeStackTrace = new Throwable();
super.dispose();
}

/**
* Returns <code>true</code> if the font has been disposed,
* and <code>false</code> otherwise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ void init(String name, float height, int style, byte[] fontString) {
}
}

public Throwable disposeStackTrace;

@Override
public void dispose() {
disposeStackTrace = new Throwable();
super.dispose();
}

/**
* Returns <code>true</code> if the font has been disposed,
* and <code>false</code> otherwise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ void init (FontData fd) {
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
}

public Throwable disposeStackTrace;

@Override
public void dispose() {
disposeStackTrace = new Throwable();
super.dispose();
}

/**
* Returns <code>true</code> if the font has been disposed,
* and <code>false</code> otherwise.
Expand Down

0 comments on commit 9d59c4e

Please sign in to comment.