Skip to content

Commit

Permalink
add dispose method for generated enum wrapper class DYN-5506 (#13975)
Browse files Browse the repository at this point in the history
* add dispose method for generated enum wrapper class

* add test

* make consistent
  • Loading branch information
mjkkirschner authored May 12, 2023
1 parent a89009e commit 27c9a6a
Show file tree
Hide file tree
Showing 2 changed files with 2,942 additions and 169 deletions.
5 changes: 5 additions & 0 deletions src/Engine/ProtoCore/FFI/CLRDLLModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ private ClassDeclNode ParseEnumType(Type type, string alias)
classnode.ClassAttributes = cattrs;
SetTypeAttributes(type, cattrs);

//register a dispose method on the generated class
bool hasDisposeMethod = false;
AssociativeNode node = ParseAndRegisterFunctionPointer(true, ref hasDisposeMethod, mDisposeMethod);
classnode.Procedures.Add(node);

return classnode;
}

Expand Down
Loading

0 comments on commit 27c9a6a

Please sign in to comment.