sapling/remotefilelog/ctreemanifest
Tony Tung 5e5270d3a7 [ctree] initialize the ManifestEntry in addChild after adding to the list
Summary: When a ManifestEntry is destroyed, we reap the heap-allocated resources it holds.  However, this (erroneously) happens when we create a ManifestEntry and add it to the list of children.  What we really need is a move constructor from C++11.  The workaround is to initialize a blank ManifestEntry, add it to the proper location, and then populate it afterwards.

Test Plan: addChild (in a later diff) no longer tramples over memory it no longer owns.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D3772915

Signature: t1:3772915:1472174144:a4baac5cb5f6e01a38042c5c6cd92570c8f8e100
2016-08-26 13:49:17 -07:00
..
convert.h [ctree] create a new method appendbinfromhex 2016-08-26 13:49:17 -07:00
manifest_entry.cpp [ctree] initialize the ManifestEntry in addChild after adding to the list 2016-08-26 13:49:17 -07:00
manifest_entry.h [ctree] initialize the ManifestEntry in addChild after adding to the list 2016-08-26 13:49:17 -07:00
manifest_fetcher.cpp [ctree] get rid of manifestkey 2016-08-22 15:42:03 -07:00
manifest_fetcher.h [ctree] get rid of manifestkey 2016-08-22 15:42:03 -07:00
manifest.cpp [ctree] initialize the ManifestEntry in addChild after adding to the list 2016-08-26 13:49:17 -07:00
manifest.h [ctree] addChild should return a ManifestEntry * 2016-08-26 13:49:17 -07:00
py-treemanifest.cpp [ctree] cache the root manifest upon retrieval 2016-08-26 13:49:17 -07:00
pythonutil.cpp [ctree] modularize the code 2016-08-22 15:40:56 -07:00
pythonutil.h [ctree] modularize the code 2016-08-22 15:40:56 -07:00
treemanifest.cpp [ctree] free memory when destroying a treemanifest object 2016-08-26 14:00:37 -07:00
treemanifest.h [ctree] free memory when destroying a treemanifest object 2016-08-26 14:00:37 -07:00