You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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.
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
changed the title
feature: messages.next() returns a different address object
[Feature] messages.next() returns a different address object
Nov 20, 2023
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)
The text was updated successfully, but these errors were encountered: