# C + +: Memory management specification for address delivery and assignment operations #
In order to ensure that the class instance can determine and effectively clear its own created memory consumption, while ensuring a low memory footprint, you should make the data inside the class as far as possible with reference delivery, for the externally passed-in object itself can use reference delivery, for external objects have a variety of data, such as other objects or fields that have been passed into the internal object, Method return value, you should use the copy value operation to get the data instead of reusing the reference.
With regard to the data referencing the object itself rather than the object, there is a correct data to ensure the validity of this. If the referenced object disappears first, it can clear its own memory, and if the referrer disappears first, it will not affect the memory management of the referenced object.
If you reference data from other objects, it is possible that objects that are referenced to the data will not be able to clean the memory properly, either externally or by referencing it internally. If the object of the referenced data disappears first, then its occupied address data is left behind and there is no chance of clearing it. This is the flaw in memory management and should be eliminated.
In other words, like inherited relationships, each object can have only one referrer. If there are multiple levels of objects, the top-level object can be referenced, not the top-level object, and cannot be referenced again.
C + +: Memory management specification for address delivery and assignment operations