|
-
Oct 27th, 2003, 01:58 PM
#1
Thread Starter
Frenzied Member
boost smart pointers
Well this is my first time using boost and I have a question
Using this example:
Code:
class TEST
{
//...blah
};
boost::shared_ptr<TEST> CTestnew TEST);
A) Is this the right way to use it?
B) Do I have to do a delete like old pointers or does the smart pointer do it for you?
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 27th, 2003, 04:24 PM
#2
Thread Starter
Frenzied Member
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 27th, 2003, 04:40 PM
#3
Except that you forgot an opening parenthesis, it's ok.
And you don't need to delete it, that's the point in using smart pointers.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 27th, 2003, 04:44 PM
#4
Thread Starter
Frenzied Member
Damn typo 
Interesting stuff in that lib
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 27th, 2003, 04:58 PM
#5
I love the boost library, there is just soo much stuff in it!
Is there any books or maybe an online resource that goes voer EVERYTHING contained in the library?
-
Oct 28th, 2003, 10:56 AM
#6
Damn, I had a beautiful piece of code using std::mem_fun, std::bind1st, std::copy, std: stream_iterator and boost::make_transform_iterator to output the results of calling a member function on every class instance stored in a vector...
But I deleted it.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|