List Info

Thread: info/SRC680 CWS sb71 : comphelper/weakbag.hxx




info/SRC680 CWS sb71 : comphelper/weakbag.hxx
user name
2007-09-11 09:04:31
Thorsten Behrens wrote:
> stephan.bergmannsun.com writes:
> 
>>     /**
>>        Add a new weak reference.
>>
>>        The implementation keeps the amount of
memory consumed linear in the
>>        number of living references added, not
linear in the number of total
>>        references added.
>>
>>        param e
>>        a non-null reference.
>>     */
>>
> Hi Stephan,
> 
> you make my day (again) - I have a variant of this in
slideshow. Small
> nit: what about doing the check for stale references
only every so
> often? Otherwise, time complexity for clients might
easily become
> quadratic...

But how often should it be done?  If done on only every k-th
invocation 
of add for some fix k then the complexity would still be
quadratic.

> x-post & fup2 discuss

[at least the x-post part seems to have not worked]

-Stephan

------------------------------------------------------------
---------
To unsubscribe, e-mail: interface-discuss-unsubscribeopenoffice.org
For additional commands, e-mail: interface-discuss-helpopenoffice.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )