[haiku-commits] Re: haiku: hrev47639 - src/kits/tracker

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 07 Aug 2014 12:35:44 +0200

On 07.08.2014 11:34, pulkomandy wrote:
But unless really necessary (e.g. in the rare case when the list is an
attribute and item deletion has a side effect), please don't use the "remove
item 0 and delete it until the list is empty" idiom. This is just horrible
performance-wise.

What would be the better way to do it, then? Iterate over the list
deleting all items, then MakeEmpty?

Yes. In this case the list is deleted anyway, so the MakeEmpty() can be omitted.

CU, Ingo


Other related posts: