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

No way to clear message::list? #17

Closed
mdeforge opened this issue May 22, 2015 · 3 comments
Closed

No way to clear message::list? #17

mdeforge opened this issue May 22, 2015 · 3 comments

Comments

@mdeforge
Copy link

There is no public function to clear a message::list, and as far as I can tell, it's not automatically cleared after an emit that uses one. I've added in a clear for myself for now, but I feel as though this is an important feature, so I just wanted to make the suggestion. Maybe the message could pop off as they are sent? That's also an idea.

@melode11
Copy link
Contributor

Hi, I'm not expecting message::list to be reused, so I didn't put too many functionalities on it (which makes it like a std::vector).
For one time use, its content will be cleared in destructor.

@mdeforge
Copy link
Author

What about getting rid of message::list and instructing users to create their own vector of type message::ptr? Seems kind of silly to create a type like message::list only to make it almost like vector. This would probably mess up your unified emit casting though. I know you're not expecting a list to be reused, but what about others?

@melode11
Copy link
Contributor

message::list is for convenience and backward compatibility. See its conversion constructors.
I need 3 more emit interfaces to do the same thing without it.

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

No branches or pull requests

2 participants