Skip to content

Commit 8f61f6a

Browse files
authored
Switch to using non-allocated InterArray object to avoid having to deallocate.
1 parent 6ef7193 commit 8f61f6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Infrastructure/Mesh/interface/ESMC_Mesh.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ int ESMC_MeshAddNodes(ESMC_Mesh mesh, int nodeCount, int *nodeIds,
187187

188188
MeshCap *mc = static_cast<MeshCap*> (mesh.ptr);
189189

190-
// Wrap node_owners in IntArray
190+
// Wrap nodeOwners and nodeMask in IntArray
191191
InterArray<int> nodeOwnersIA(nodeOwners,nodeCount);
192-
InterArray<int> *node_mask = new InterArray<int> (nodeMask, nodeCount);
192+
InterArray<int> nodeMaskIA(nodeMask, nodeCount);
193193

194194
// call into ESMCI method
195195
mc->meshaddnodes(&nodeCount, nodeIds, nodeCoords, &nodeOwnersIA,
196-
node_mask, &(mc->coordsys_mc), &(mc->sdim_mc), &localrc);
196+
&nodeMaskIA, &(mc->coordsys_mc), &(mc->sdim_mc), &localrc);
197197

198198
if (ESMC_LogDefault.MsgFoundError(localrc, ESMCI_ERR_PASSTHRU, ESMC_CONTEXT,
199199
&rc)) return rc;

0 commit comments

Comments
 (0)