On 31/03/17 19:56, Hans Boehm wrote:
> This method should be used when cleanup actions (finalize() calls, or
> Reference enqueuing, Cleaner invocation) could otherwise be triggered while
> a resource under control of the object is still in use. This method should
> normally be called when these cleanup facilities are used to perform
> actions other than simply issuing a warning.

It's still pretty confusing.  It would be simpler to say that
reachabilityFence should be used at the end of every method of a class
which has cleanup actions if you don't want those cleanup actions to
be run before the end of that method.  In that case, reachabilityFence
only makes any difference in cases where otherwise you'd have a bug.

Andrew.

Reply via email to