Re: [interface-announce] info/SRC680 CWS sb71 : comphelper/weakbag.hxx

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [interface-announce] info/SRC680 CWS sb71 : comphelper/weakbag.hxx

stephan.bergmann
Thorsten Behrens wrote:

> [hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]