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

[Feature] messages.next() returns a different address object #277

Open
javeme opened this issue Oct 29, 2023 · 1 comment
Open

[Feature] messages.next() returns a different address object #277

javeme opened this issue Oct 29, 2023 · 1 comment
Labels
feature New feature

Comments

@javeme
Copy link
Contributor

javeme commented Oct 29, 2023

          > always return the same Object is reduce memory pressure and avoid GC

Yep~ But semantically, messages.next() returns a different address object more intuitive.
Otherwise, someone who call this function downstream need to clearly know that the same object is returned here, which is not logically intuitive and easy to make mistakes.

Do we have some more elegant solutions?

Originally posted by @diaohancai in #275 (comment)

@diaohancai
Copy link
Contributor

We hope that after the memory management module is added, this confusion can be solved.

Great~ Could you disclose the design for the memory management?

@coderzc coderzc changed the title feature: messages.next() returns a different address object [Feature] messages.next() returns a different address object Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants