benlilaj / gears

Automatically exported from code.google.com/p/gears
0 stars 1 forks source link

about delete entries #937

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the codes are:
base/common/thread_locals.cc

void ThreadLocals::DestroyEntries(Entry* entries) {
  for (int i = 0; i < kMaxSlots; ++i) {
    if (entries[i].valid_ && entries[i].destructor_) {
      entries[i].destructor_(entries[i].value_);
    }
    entries[i].valid_ = false;
  }
  delete entries;
}

"entries" is deleted by "delete" op, isn't it should be "delete []" ?

Original issue reported on code.google.com by do.chuan@gmail.com on 17 Aug 2009 at 7:43

GoogleCodeExporter commented 9 years ago
code review

Original comment by do.chuan@gmail.com on 17 Aug 2009 at 7:45

GoogleCodeExporter commented 9 years ago
Fixed by r3398. Thanks!

Original comment by nigel.ta...@gmail.com on 7 Sep 2009 at 2:15