Every time I want to pass a shared pointer to a function, it makes sense to pass it by reference. Is there any reason not to? #programming
Take this example: http://www.cppsamples.com/common-tasks/shared-ownership.html … why take the shared pointer by value? It's use is scoped. If you store it off, then copy it to
-
-
To that shared pointer and it's all good. But the extra add ref and remove ref seems unnecessary.
Kiitos. Käytämme tätä aikajanasi parantamiseen. KumoaKumoa
-
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.