On Sun, Jun 24, 2012 at 8:31 PM, Vladimir Berezniker <v...@hitechman.com> wrote:
> In case of delta editor, commit callback is provided at the time of the editor
> creation and used during the close_edit() call. For that there is a need to
> keep a global reference to the underlying java object so that it does not get
> GCed meanwhile.
>
> Attached please find the patch that adds such capabilities.
>
> Thank you,
>
> Vladimir
>
> [[[
> JavaHL: Support keeping global reference to the callback java object for cases
> when callback is being used across method calls
>
> [ in subversion/bindings/javahl/native ]
>
> * CommitCallback.cpp,
>  CommitCallback.h
>  (CommitCallback, ~CommitCallback): Add handling of additional parameter and
>    state when requesting a global reference to be kept
> ]]]

I don't like putting the burden on the caller that constructs the
Commit callback to define whether a global reference should be held or
not.  Can't the thing consuming the callback reference make that
determination?

(Alternatively, could we have a subclass which keeps a global
reference around, and let the caller instantiate that if needed?)

-Hyrum



-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Reply via email to