On Sat, 14 Jan 2017 02:05:11 +0000, nbro wrote: > On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: >> I write the ref count pointer and the scoped point in D. it just Like >> cpp's shared_ptr ， waek_ptr and unique_ptr . >> Now, it is Developing. >> I will write more test before the frist release. >> And the docs is null. >> It on github: https://github.com/huntlabs/SmartRef > > What's would be the advantages of smart pointers in D?
It's reference counting. Reference counting is like garbage collection, but deamortized. This is better for real-time applications. However, it adds overhead on every assignment and every variable going out of scope. In D, garbage collection is more expensive than it is in other languages, so the tradeoff is more attractive than it would be in other languages.