Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Code issues #6

Closed
Closed
@amos402

Description

@amos402

var handle = GCHandle.Alloc(domain, GCHandleType.Pinned);

It's not necessary to use pinned, there nowhere used its original structure.

return Marshal.GetFunctionPointerForDelegate(deleg);

deleg is a local variable, once the method returned, it might be collected by GC, after that, the pinter is a dangling one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions