Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Noel,


So I've been working on this patch to move mpNotes from ScBaseCell to
ScTable, and I got it mostly working.
But I was struggling with leaks and getting the lifecycle of the notes
to exactly match the lifecycle of the ScBaseCell object.


I think that we should go another way. Firstly we should not use a
static variable here. Please make the NotesMap a member variable of
ScTable. I hope that this solves one part of your problem and then we
should no longer need to make the notes directly available to the
cells. Every information we need should already be available in
ScTable and the idea behind this rework is not only to save a bit
memory per cell but to prepare calc for ixion.

Personally I think we should use another datastructure like
std::map<Address2D, ScPostIt*> or bootst::ptr_map<Address2D, ScPostIt>
but that is something we can figure out later. I think for now it is
more important to move the container to ScTable and make it a member
variable.

So then I had a weird idea - how about if I tied the lifecycles
together implicitly?
So I came up with this patch.

It compiles, and passes a make check.

I'll do a memcheck run on Monday when I can get access to my other
machine with tons of memory.

Markus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.