mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional PtrList constructor and memory management method
- PtrList::release() method.
Similar to autoPtr and unique_ptr and clearer in purpose than
using set(i,nullptr)
- Construct from List of pointers, taking ownership.
Useful when upgrading code. Eg,
List<polyPatch*> oldList = ...;
PtrList<polyPatch> newList(oldList);
...
BUG: incorrect resizing method names (PtrDynList) in previously unused code
This commit is contained in:
@ -391,7 +391,7 @@ bool Foam::sampledSurfaces::read(const dictionary& dict)
|
||||
{
|
||||
const dictionary& surfDict = capture[inputi];
|
||||
|
||||
autoPtr<sampledSurface> surf = input.set(inputi, nullptr);
|
||||
autoPtr<sampledSurface> surf = input.release(inputi);
|
||||
|
||||
if (!surf.valid() || !surf->enabled())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user