Skip to content

support hot reload #11

Description

@shingohu

When hot reload, the connected serial port was not released, so sometimes communication cannot be resumed after reconnection
I think we can do it this way

1、Provide address api like this,so we can save this address
int get address {
return _serialPtr?.address ?? 0;
}

2、Provide a static free api like this.

static void freeByAddress(int address) {
if (address > 0) {
_bindings.serial_free(ffi.Pointer.fromAddress(address));
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions