Changeset 1806 in webkit for trunk/JavaScriptCore/kjs/collector.cpp
- Timestamp:
- Aug 13, 2002, 12:39:10 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/collector.cpp
r1791 r1806 208 208 while (block) { 209 209 ValueImp **r = (ValueImp**)block->mem; 210 int del = 0; 210 211 for (int i = 0; i < block->size; i++, r++) { 211 212 ValueImp *imp = (*r); … … 218 219 imp->~ValueImp(); 219 220 } 220 }221 block = block->next;222 }223 224 // 2nd step: free memory225 block = root;226 while (block) {227 ValueImp **r = (ValueImp**)block->mem;228 int del = 0;229 for (int i = 0; i < block->size; i++, r++) {230 ValueImp *imp = (*r);231 221 if (imp && (imp->_flags & ValueImp::VI_DESTRUCTED) != 0) { 232 222 free(imp); … … 237 227 filled -= del; 238 228 block->filled -= del; 239 block = block->next;240 229 if (del) 241 230 deleted = true; 242 }243 244 // delete the empty containers245 block = root;246 while (block) {247 231 CollectorBlock *next = block->next; 248 232 if (block->filled == 0) { … … 260 244 block = next; 261 245 } 246 262 247 #if 0 263 248 // This is useful to track down memory leaks
Note:
See TracChangeset
for help on using the changeset viewer.