[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] JavaHL: Support commit callback across method invocations

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Tue, 26 Jun 2012 13:21:02 -0600

On Sun, Jun 24, 2012 at 8:31 PM, Vladimir Berezniker <vmpn_at_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/
Received on 2012-06-26 21:21:34 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.