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

RefPtr should have a release method #18756

Open
imtrobin opened this issue Mar 30, 2018 · 2 comments
Open

RefPtr should have a release method #18756

imtrobin opened this issue Mar 30, 2018 · 2 comments

Comments

@imtrobin
Copy link

Hi, like std unique_ptr, RefPtr should have a release method so we can manage the smart ptr ourselves

@drelaptop
Copy link
Contributor

@imtrobin please give more description, for example why need this, what will happen if not

@imtrobin
Copy link
Author

Now, it seem like assigning it to null ,but std ptr do not allow this kind of auto conversions because it is potentiall dangerous as it prevents some accidental pointer conversions.

There are some old discussions on why std ptr is designed to be explicit,
https://stackoverflow.com/questions/34882140/why-cant-a-pointer-be-automatically-converted-into-a-unique-ptr-when-returning

@drelaptop drelaptop added this to the 3.18 milestone May 23, 2018
@drelaptop drelaptop removed this from the 3.17.1 milestone Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants