in the current versioning we don't store a pointer. We only keep a reference
of that page when we encounter
it and then set it back when we deserialize it (that immediately happens)

So if that page is in the pagemap by itself or not doesn't really matter (it
is in the pagemap through the other page ofcourse)

So the gotcha is that suddenly you have 2 complete pages in mem when you
only want to have or think you have one.

johan

On 12/6/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

if this does happen then we do need to store the page. who knows what that
model is doing, it might be reading/writing properties on that page. dont
think we have much choice. and storing a pointer like we do for versioning
wont work because the page might be evicted from the pagemap. so i guess
we
make no changes and that item remains in the gotchas.

-igor


On 12/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
>
> versioning can handle this. because it won't clone the page but you will
> keep the reference to the old page for every of course.
>
> and if that page2 gets saved to disk and reloaded back in it will also
> instantiate the page1 again ofcourse.
> So you will have always that baggage of that extra page.
>
> in 2.0 we have already code that does the clone by mapping the object
> that is more sophisticated as the 1.2/1.3 code that just saving it to a
> byte
> array and back again.
> But we don't use it except 5 or 6 tests.
>
> The methods are mapObject and restoreObject of the class Objects.
> With that versioning is completely automatic. But i don't know anymore
> what
> the end status was
> what we should do.. igor?
>
> johan
>
> On 12/6/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> >
> > From the gotchas page on our wiki:
> >
> > The other thing to avoid is anonymous or nested instances of IModel.
> > Usually you share an instance of a model between two page instances.
> > If you create an anonymous or nested instance of IModel, then you
> > automatically get a 'this' reference to the class that surrounds it.
> > This will usually be the page, but can also be the form or a listview.
> > Anyway, because the reference is /final/, you will copy that reference
> > to the old page, with the model to the new page, thus duplicating the
> > component tree (it gets versioned etc.). This will eventually lead to
> > OutOfMemoryError.
> >
> > Does this still hold? I thought we did something to remedy this?
> >
> > Martijn
> > --
> > <a href="http://www.thebeststuffintheworld.com/vote_for/wicket
">Vote</a>
> > for <a href="http://www.thebeststuffintheworld.com/stuff/wicket
> > ">Wicket</a>
> > at the <a href="http://www.thebeststuffintheworld.com/";>Best Stuff in
> > the World!</a>
> >
>
>


Reply via email to