ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/arch.C
(Generate patch)

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.84 by root, Mon Sep 29 10:31:32 2008 UTC vs.
Revision 1.86 by root, Sun Oct 5 14:54:05 2008 UTC

440 return new_head; 440 return new_head;
441 } 441 }
442 442
443fail: 443fail:
444 for (auto (p, parts.begin ()); p != parts.end (); ++p) 444 for (auto (p, parts.begin ()); p != parts.end (); ++p)
445 (*p)->destroy (true); 445 (*p)->destroy ();
446 446
447 return 0; 447 return 0;
448} 448}
449 449
450void 450void
510 510
511 if (at->refcnt_cnt () > 1) // all arches have ONE refcount from their object 511 if (at->refcnt_cnt () > 1) // all arches have ONE refcount from their object
512 ++idx; 512 ++idx;
513 else 513 else
514 { 514 {
515 LOG (llevDebug, "garbage collect arch %s", at->debug_desc ()); 515 LOG (llevDebug, "garbage collect arch %s", &at->archname);
516 assert (at->arch == at); // verify that refcnt == 1 is truly valid 516 assert (at->arch == at); // verify that refcnt == 1 is truly valid
517 allarch.erase (idx); 517 allarch.erase (idx);
518 518
519 // break chain 519 // break chain
520 for (object *op = at->head_ (); op; ) 520 for (object *op = at->head_ (); op; )
523 op->head = 0; 523 op->head = 0;
524 op->more = 0; 524 op->more = 0;
525 op = next; 525 op = next;
526 } 526 }
527 527
528 at->destroy (true); 528 at->destroy ();
529 at->arch = 0; 529 at->arch = 0;
530 } 530 }
531 } 531 }
532 while (--cnt); 532 while (--cnt);
533} 533}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines