由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - c++ 里用到pointer 的地方我们尽可能用smart pointer吗?
相关主题
Smart PointerWhy do I need to use "plain" pointer?
is smart_ptr really that good?map shared memory to local process
琢磨了一下c++ smart pointer,发现不能到处用pointer overflow
请问:Auto_Ptr、Smart Ptr 和 Reference Counting是什么关系? (转载)C++ Q05: pointer to constant variable
c++ interview: iterator 和 pointer区别?C++ Q93 - Q95 (转载)
关于不同类型的smart pointerint F::*x = &F::x是什么意思?
C++的smart pointer注定是个二流的东西不如各位高手挑个专题讲讲C++11吧
什么时候使用c++ smart pointer?Go adopts JavaScript’s idea of semicolon insertion
相关话题的讨论汇总
话题: pointer话题: c++话题: smart话题: pointers话题: 尽可能
进入Programming版参与讨论
1 (共1页)
r*******n
发帖数: 3020
1
rt
m*******l
发帖数: 12782
2
no pointer is the best pointer

【在 r*******n 的大作中提到】
: rt
r*******n
发帖数: 3020
3
seriously?
C++里不能避免用pointer吧

【在 m*******l 的大作中提到】
: no pointer is the best pointer
m*******l
发帖数: 12782
4
just avoid them as possible as you can

【在 r*******n 的大作中提到】
: seriously?
: C++里不能避免用pointer吧

N*****m
发帖数: 42603
5
至少我们公司是这样的

【在 r*******n 的大作中提到】
: rt
m*******l
发帖数: 12782
6
问题是这个什么东西啊,一哪个啥就容易滥用...

【在 N*****m 的大作中提到】
: 至少我们公司是这样的
N*****m
发帖数: 42603
7
当然是该用的时候才用

【在 m*******l 的大作中提到】
: 问题是这个什么东西啊,一哪个啥就容易滥用...
d**********x
发帖数: 4083
8
尽量用成熟的库或者山寨成熟的库吧,要不然线程安全问题就够喝一壶的了

【在 r*******n 的大作中提到】
: rt
m*******l
发帖数: 12782
9
老大,这时另外一个话题了

【在 d**********x 的大作中提到】
: 尽量用成熟的库或者山寨成熟的库吧,要不然线程安全问题就够喝一壶的了
n******t
发帖数: 4406
10
我个人认为最好不要用smartptr.
如果你掉的库要用,你就用。

【在 r*******n 的大作中提到】
: rt
相关主题
关于不同类型的smart pointerWhy do I need to use "plain" pointer?
C++的smart pointer注定是个二流的东西map shared memory to local process
什么时候使用c++ smart pointer?pointer overflow
进入Programming版参与讨论
g****u
发帖数: 252
11
最好不用pointer.

【在 r*******n 的大作中提到】
: rt
d**********x
发帖数: 4083
12
= =

【在 m*******l 的大作中提到】
: 老大,这时另外一个话题了
d**********x
发帖数: 4083
13
恩,要用的话就是整个项目都用
否则就小心为上

【在 n******t 的大作中提到】
: 我个人认为最好不要用smartptr.
: 如果你掉的库要用,你就用。

s*********t
发帖数: 1663
14
完全取决于关于lifetime的contract

【在 r*******n 的大作中提到】
: rt
f******y
发帖数: 2971
15
thread local storage可以解决,gcc早就支持c版本的了。4.8以后要支持c++11版本的
了。

【在 d**********x 的大作中提到】
: 尽量用成熟的库或者山寨成熟的库吧,要不然线程安全问题就够喝一壶的了
b*******s
发帖数: 5216
16
try boost's smart pointers

【在 r*******n 的大作中提到】
: rt
d****i
发帖数: 4809
17
Are you kidding? C++ program without pointers will not be called C++ at all.
It is the bare metal thing that makes pointers so much fun and so much
fascinating.

【在 g****u 的大作中提到】
: 最好不用pointer.
a***n
发帖数: 538
18
boost的shared pointer很慢,前一段时间profile一个程序,shared pointer的计数器
用了5%的cpu。
O*******d
发帖数: 20343
19
我是一般情况下,尽量用smart pointer。 在一些高强度的循环中,把raw pointer从
smart pointer中调出来,直接用。这样可以避免smart pointer的overhead。 我的原
则是,用smart pointer来管理memory,尽量不用delete。 我写的code中,几乎没有
delete。
1 (共1页)
进入Programming版参与讨论
相关主题
Go adopts JavaScript’s idea of semicolon insertionc++ interview: iterator 和 pointer区别?
一个小问题关于不同类型的smart pointer
smart pointer 一问C++的smart pointer注定是个二流的东西
stl的interator是一种smart pointer吗什么时候使用c++ smart pointer?
Smart PointerWhy do I need to use "plain" pointer?
is smart_ptr really that good?map shared memory to local process
琢磨了一下c++ smart pointer,发现不能到处用pointer overflow
请问:Auto_Ptr、Smart Ptr 和 Reference Counting是什么关系? (转载)C++ Q05: pointer to constant variable
相关话题的讨论汇总
话题: pointer话题: c++话题: smart话题: pointers话题: 尽可能