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

When to use CatalystWrapper vs CatalystWrapper& #26

Closed
adamv opened this issue May 13, 2009 · 2 comments
Closed

When to use CatalystWrapper vs CatalystWrapper& #26

adamv opened this issue May 13, 2009 · 2 comments

Comments

@adamv
Copy link
Contributor

adamv commented May 13, 2009

EditorCtrls get passed a CatalystWrapper& reference, which they store in a reference member variable.

RevTooltip gets passed a CatalystWrapper (not a reference), which is stored in a non-reference member variable.

Is there a checklist for when to use what?

On first look it seems that changing RevTooltip to also use references wouldn't be a bad thing, but I wonder if they are using non-references due to a big fix.

@astigsen
Copy link
Collaborator

Non-reference CatalystWrappers should only be used when you are not sure that the parent will stay around. So the one in RevTooltip should be safe to change to a reference.

@adamv
Copy link
Contributor Author

adamv commented May 29, 2009

Thanks.

This issue was closed.
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