comparison Resources/Conventions.txt @ 1299:c38c89684d83 broker

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 17:21:24 +0100
parents 0e3a3be313fd
children 3d26447ddd28
comparison
equal deleted inserted replaced
1297:6ab03e429f06 1299:c38c89684d83
60 60
61 Pointers 61 Pointers
62 -------- 62 --------
63 63
64 * As we are targeting C++03 (for VS2008 and LSB compatibility), use 64 * As we are targeting C++03 (for VS2008 and LSB compatibility), use
65 "std::auto_ptr<>" and "boost::shared_ptr<>" (*not* 65 "std::unique_ptr<>" and "boost::shared_ptr<>" (*not*
66 "std::shared_ptr<>"). 66 "std::shared_ptr<>").
67 67
68 * The fact of transfering the ownership of one object to another must 68 * The fact of transfering the ownership of one object to another must
69 be tagged by naming the method "Acquire...()", and by providing a 69 be tagged by naming the method "Acquire...()", and by providing a
70 raw pointer. 70 raw pointer.
71 71
72 * Use "std::auto_ptr<>" if the goal is to internally store a pointer 72 * Use "std::unique_ptr<>" if the goal is to internally store a pointer
73 whose lifetime corresponds to the host object. 73 whose lifetime corresponds to the host object.
74 74
75 * The use of "boost::weak_ptr<>" should be restricted to 75 * The use of "boost::weak_ptr<>" should be restricted to
76 oracle/message handling. 76 oracle/message handling.
77 77