Skip to content

Commit edffe15

Browse files
authored
Add finalizer to create_struct (#460)
1 parent 399e0e1 commit edffe15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/datatypes.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ function create_struct(blocklengths, displacements, types)
213213
(Cint, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}),
214214
N, blocklengths, displacements, mpi_types, newtype)
215215
end
216+
finalizer(free, newtype)
216217
return newtype
217218
end
218219

0 commit comments

Comments
 (0)