*/
public interface CloseTracked<T extends CloseTracked<T>> {
+ /**
+ * This returns the allocation context as {@link StackTraceElement}s. NB that
+ * this is a relatively <b>EXPENSIVE</b> operation! You should only ever call
+ * this when you really need to, e.g. when you actually produce output for
+ * humans, but not too early.
+ */
+ // TODO When we're on Java 9, then instead return a StackWalker.StackFrame[] here?
@Nullable StackTraceElement[] getAllocationContextStackTrace();
CloseTracked<T> getRealCloseTracked();