473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

where's Boost's shared_ptr destructor?

Newsgroupies:

[Apologies for the marginal topicality; I need to cultivate a relationship
with the Boost mailing lists that rises above distracting trivia like
this.]

The purpose of a smart pointer is to delete its pointee when it destructs,
right?

When I grab Boost 1.33.0 and open shared_ptr.hpp and search for ~, I can't
find nothing. No destructor.

What is the purpose of the shared pointer template? To wrap pointers and
then leak them?

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Mar 20 '06 #1
2 3084
Take a look at the destructors for the data member types. They are
implicitly called when the shared_ptr object is destroyed.

Mar 20 '06 #2
tm*****@gmail.com wrote:
Take a look at the destructors for the data member types. They are
implicitly called when the shared_ptr object is destroyed.


Oooh, I was about to complain about the complementary evidence; my debugger
cannot seem to trace into them. But that is indeed a platform-specific
issue for the mailing list. It will now have to wait in line, behind my
other issues!

Boost is wonderful, everyone!! Boost rocks!!!

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Mar 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Capstar | last post by:
Hi NG, I was looking through the code of boost::shared_ptr, and found the following piece of code in some referenced header file. As far as I understand it, it is used to delete the object the...
0
by: eric | last post by:
Can I declare a pure virtual member function which accepts as input a boost shared pointer to an object of a base class, such that - concrete implementations of the function can redirect the...
2
by: kathy | last post by:
I have code: boost::scoped_ptr< CSpectrograph > m_pSpectrograph; .... m_pSpectrograph.reset( new CSpectrograph(init_data) ); .... But I found the CSpectrograph destructor never been...
4
by: zl2k | last post by:
hi, all I have some questions about stl vector. Suppose I have std::vector<std::vector<int v; //populate v //now I want to clear v, should I just write: v.clear(); //or for (int i = 0; i <...
7
by: myfavdepo | last post by:
Hi all, I have a query regarding the exchanging of a boost::shared_ptr beween different threads. In my program i've two threads both of which having their own internal queues for storing the...
1
by: Noah Roberts | last post by:
Trying to use boost::function in a C++/CLI program. Here is code: pragma once #include <boost/function.hpp> #include <boost/shared_ptr.hpp> #include <vector> using namespace System;
5
by: number774 | last post by:
I've used Boost for this example; in fact we have our own pointer class, for historic reasons. #include "boost\shared_ptr.hpp" // A heirarchy of classes class G1 {}; class G2: public G1 {};...
4
by: EnsGabe | last post by:
Suppose you have a class heirarchy as such: class Base{ .... }; class Mid1 : public Base{ ....
0
by: phlip | last post by:
Nick Keighley wrote: CC'd to the correct newsgroup. Yes, the destructor of the shared pointer will delete the object. Then its former address will convert to a reference. At some point -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.