Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS circular references cause some unexpected exceptions #1798

Open
2 tasks done
qzlong opened this issue May 8, 2024 · 1 comment
Open
2 tasks done

MacOS circular references cause some unexpected exceptions #1798

qzlong opened this issue May 8, 2024 · 1 comment
Labels

Comments

@qzlong
Copy link

qzlong commented May 8, 2024

Checklist

  • I read the troubleshooting guide before raising this issue
  • I made sure that the issue I am raising doesn't already exist

Current bug behaviour

In the file SwiftAudioplayersDarwinPlugin.swift, the register method creates an instance of SwiftAudioplayersDarwinPlugin that holds the registrar, and the register method calls registrar.addMethodCallDelegate(instance, channel: methods) to register the instance with the registrar.
Circular references have caused some anomalies. Perhaps it is possible to change the attribute definition from var register: FlutterPluginRegister to weak var register: FlutterPluginRegister?
image

Expected behaviour

Steps to reproduce

No response

Code sample

No response

Affected platforms

iOS, macOS

Platform details

No response

AudioPlayers Version

main

Build mode

No response

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

No response

Related issues / more information

No response

Working on PR

no way

@qzlong qzlong added the bug label May 8, 2024
@Gustl22
Copy link
Collaborator

Gustl22 commented May 13, 2024

Good insight, thanks. Perhaps one can look at other platform implementations e.g. video_player and apply the best practice to the darwin implementation. We appreciate any help from the community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants