I have a class variable defined like this: I want to make it store ints from 0 to 10 so that when I call variable[1] it returns 1 and so on. ...
I have a class variable defined like this: I want to make it store ints from 0 to 10 so that when I call variable[1] it returns 1 and so on. ...
I just started learning smart pointer and came across a situation which seems to be contradicting with the theory. For e.g. When we use shared_ptr and ...
I’m working on embedded projects, using Zephyr RTOS with ARM embedded microcontrollers like STM32 Nucleo series (Cortex M4/0). Recently, due to sign ...
I have a std::vector with thousands of objects, stored as shared_ptr. Since the object has many attributes that can be used for searching, I maintain ...
As far as I know, auto_ptr works on the concept of transfer of ownership. Also, once an auto pointer transfer its ownership to another auto pointer, i ...
in the follow code memory leak happened, I have my doubt about that. in the test() fun: // childern_ptr pop from stack, I think the childern_ptr ...
I'm trying to use a boost::scoped_ptr with my implementation class that is visible only in the cpp file of the containing class. The containing class ...
Since boost::scoped_ptr doesn't work with [] indexing operator, I am trying to do a workaround like this Will the array be freed later on? Is there ...
So what I am trying to do is use Qt signals and slots to pass around an image through a smart_ptr so that it will delete itself when everything that n ...
I have two classes say foo and bar. The constructor of foo is private so as to only allow the bar class to instantiate it. Also I am using boost::s ...
pseudo code : I want to use shared_ptr to manage pointer of A and B. B is A's child. And when have strong reference to child, parent A can't be des ...
I have an library that don't give correct output. I guess it is possibly an write violation, and focused it on this section of code: The default_fr ...
I'm trying to wrap Cairo with intrusive_ptr. As the things in Cairo already have reference counting, I wrote a very simple wrap: However, when I t ...
Today I want to use a boost::scoped_ptr to point to a boost::thread. In my Thread.h I have boost::scoped_ptr<boost::thread> m_thread and in my ...
In this boost async udp server example: http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/tutorial/tutdaytime6/src.html from http://www.boos ...
Simple question here: are you allowed to explicitly delete a boost::shared_ptr yourself? Should you ever? Clarifying, I don't mean delete the pointer ...
So , I have done a fair bit of googling trying to figure out if there is some best smart pointer to handle this but I have not been able to settle on ...
This doesn't compile, But this does : and this : I suppose it has something to do with SFINAE (which I haven't as of yet bothered to under ...
I've been playing around with some Boost components, and the only one I see a direct need for in the project I'm working on is boost::shared_ptr. Wou ...
I'm using boost::scoped_array in a container that I want to make copy-on-write but I fear that scoped_array won't work. Which boost::smart_ptr contain ...