[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [kspread] formatting design
From:       John Dailey <dailey () vt ! edu>
Date:       2002-12-16 5:42:51
[Download RAW message or body]

On Sunday 15 December 2002 03:38 am, Ariya Hidayat wrote:
> For each cell, we have member object for the value (of KSpreadValue class).
> Looking at the KSpreadValue class, there's only one private member pointer,
> thus sizeof KSpreadValue is 8 bytes (actual depends on the system).
>
> OTOH if each cell holds a pointer to KSpreadValue, the additional size will
> be 12 bytes: 4 bytes (for the pointer) plus 8 bytes (the instance/object of
> KSpreadValue itself),
not entirely true, actually, because if we used pointers for KSpreadValue then 
the private pointer inside of KSpreadValue would not be needed to achieve 
sharing.  The private data itself would be in KSpreadValue.  So it ends up 
being the same size.
However I would still support your way of doing it which allows us to use the 
constructor/destructor/copy constructor to keep a reference count and so we 
know when to delete the data.  (if you think about it, KSpreadValue is 
nothing more than a really fancy pointer to KSpreadValueData).

>
>
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic