Changes between Version 21 and Version 22 of MapGuideCodingStandards
- Timestamp:
- 07/14/08 13:42:26 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideCodingStandards
v21 v22 99 99 }}} 100 100 101 In this case !MgFoo is a ref-counted object, and because of this you might think your only choice is call tonew and assign the result to a smart pointer. In fact, if the call to Bar does not add any references to the object then the following code which doesn't call new also works:101 In this case !MgFoo is a ref-counted object, and because of this you might think your only choice is to call new and assign the result to a smart pointer. In fact, if the call to Bar does not add any references to the object then the following code which doesn't call new also works: 102 102 {{{ 103 103 #!cpp