Changes between Version 2 and Version 3 of Ticket #5959
- Timestamp:
- May 12, 2015, 10:33:31 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5959
- Property Summary Add a copy constructor to OGRFeatureDefn → Add a copy constructor and copy assignment operator to OGRFeatureDefn
-
Ticket #5959 – Description
v2 v3 1 I think we should add a copy constructor to OGRFeatureDefn. Otherwise, the following code will crash. The reason is obvious that the memory of papoGeomFieldDefn is getting released.1 I think we should add a copy constructor and copy assignment operator to OGRFeatureDefn. Otherwise, the following code will crash. The reason is obvious that the memory of papoGeomFieldDefn is getting released. 2 2 3 3 … … 9 9 10 10 11 If you don't want to implement the copy constructor, should at least mark it as delete (C++11) or make it private to prevent developers of making mistakes by calling it. 12 13 As a matter of fact, I think we need [http://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29 Rule of 5] to make it safe to use. 11 Should at least mark it as delete (C++11) or make it private to prevent developers of making mistakes by calling it. As a matter of fact, adding all [http://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29 rule of 5] will be better.