Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by cryptonector

3 months ago

> Can you return `UniquePtr` from a function?

Yes: you can return structures by value in C (and also pass them by value).

> Can you store a copy of `SharedPtr` somewhere without accidentally forgetting to increment the refcount?

No, this you can't do.

0 comments

cryptonector

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities