Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Side by Side Diff: core/cross/pack.cc

Issue 6542028: Log the number of objects in a Pack when it is deleted in debug builds to hel... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 O3D_DEFN_CLASS(Pack, NamedObject) 54 O3D_DEFN_CLASS(Pack, NamedObject)
55 55
56 Pack::Pack(ServiceLocator* service_locator) 56 Pack::Pack(ServiceLocator* service_locator)
57 : NamedObject(service_locator), 57 : NamedObject(service_locator),
58 class_manager_(service_locator->GetService<IClassManager>()), 58 class_manager_(service_locator->GetService<IClassManager>()),
59 object_manager_(service_locator->GetService<ObjectManager>()), 59 object_manager_(service_locator->GetService<ObjectManager>()),
60 renderer_(service_locator->GetService<Renderer>()) { 60 renderer_(service_locator->GetService<Renderer>()) {
61 } 61 }
62 62
63 Pack::~Pack() { 63 Pack::~Pack() {
64 DLOG(INFO) << owned_objects_.size()
65 << " objects still in Pack at time of deletion";
64 } 66 }
65 67
66 bool Pack::Destroy() { 68 bool Pack::Destroy() {
67 return object_manager_->DestroyPack(this); 69 return object_manager_->DestroyPack(this);
68 } 70 }
69 71
70 bool Pack::RemoveObject(ObjectBase* object) { 72 bool Pack::RemoveObject(ObjectBase* object) {
71 return UnregisterObject(object); 73 return UnregisterObject(object);
72 } 74 }
73 75
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 487
486 bool Pack::UnregisterObject(ObjectBase *object) { 488 bool Pack::UnregisterObject(ObjectBase *object) {
487 ObjectSet::iterator find(owned_objects_.find(ObjectBase::Ref(object))); 489 ObjectSet::iterator find(owned_objects_.find(ObjectBase::Ref(object)));
488 if (find == owned_objects_.end()) 490 if (find == owned_objects_.end())
489 return false; 491 return false;
490 492
491 owned_objects_.erase(find); 493 owned_objects_.erase(find);
492 return true; 494 return true;
493 } 495 }
494 } // namespace o3d 496 } // namespace o3d
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698