Skip to content

Error handler pointer getting garbage collected #12

@bgarrood

Description

@bgarrood

I am using muparsernet in my multithreaded application and was getting random errors with following description;
A callback was made on a garbage collected delegate of type 'muParserNET!muParserNET.ErrorFuncType::Invoke'

I think because pointer to error handler in teh managed code gets garbage collected before getting called by unmanaged code. In the managed code I have fixed by using GCHandle to lock the error function pointer from getting garbage collected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions