#179 ownership issue in VTKWriter interface
Metadata
| Property | Value |
|---|---|
| Reported by | unknown (unknown) |
| Reported at | Sep 14, 2006 15:21 |
| Type | Feature Request |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Last edited at | Apr 8, 2009 13:55 |
| Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Closed at | Apr 8, 2009 13:55 |
| Closed in version | Unknown |
| Resolution | Implemented |
| Comment | VTKWriter now stores SmartPointer |
old methods are deprecated |
Description
VTKWriter::addVertexData (VTKFunction *p) takes ownership of the object pointed to by p. This should at least be mentioned in the documentation. Even better would be an interface change to VTKWriter::addVertexData (std::auto_ptr p), which makes it clear beyond any doubt that the caller has no longer to care for the object pointed to by p (and better doesn't pass an object allocated on the stack...)
The same holds for VTKWriter::addCellData (VTKFunction *p).
Martin Weiser