除了malloc/free,new/delete配對外(即:分配必須施放),還有什麽tips?
大家能獻獻高見嗎:(c++)怎麽防止吃內存?
除了malloc/free,new/delete配對外(即:分配必須施放),還有什麽tips?
所有跟帖:
•
我想整理下這方麵的東西,好在這方麵吹吹牛。
-戲雨飛鷹-
♀
(12 bytes)
()
01/23/2009 postreply
09:09:55
•
你好牛
-catcherintherye-
♂
(29 bytes)
()
01/23/2009 postreply
09:13:05
•
wo哪樣都不行。:)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
09:15:48
•
把題目放大一點,pointer使用注意啥?我吃飯去了。下午見:)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
09:16:21
•
心中很盼能獻獻,可惜木有啥高見.縱然不再吃內存,能寫寇得到幾年?
-美國老土-
♂
(819 bytes)
()
01/23/2009 postreply
09:32:03
•
飛鷹中了邪,這化石語言附體了,該跳個大神。
-竹杉林-
♂
(0 bytes)
()
01/23/2009 postreply
09:53:27
•
你看你,不幫我走向牛壇就算了,還汙蔑我的看家本事~~
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
10:30:03
•
Just learned Google, Amazon, etc are using script languages
-竹杉林-
♂
(533 bytes)
()
01/23/2009 postreply
11:48:13
•
C/C++ are for different things than PHP, PERL, Python, Ruby
-any_mor_left-
♂
(92 bytes)
()
01/23/2009 postreply
12:03:44
•
My last job was developing applications using PERL
-竹杉林-
♂
(33 bytes)
()
01/23/2009 postreply
12:20:27
•
估計any-mor-left此刻正忙著呢?~~。謝謝!
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
12:31:53
•
正忙著?沒有.
-any_mor_left-
♂
(0 bytes)
()
01/23/2009 postreply
12:37:30
•
是的是的,現在C/C++一般用在game/embedded/driver等方麵,
-戲雨飛鷹-
♀
(186 bytes)
()
01/23/2009 postreply
10:36:50
•
好, 我也“向飛鷹姐姐學習”。
-nopanic-
♀
(0 bytes)
()
01/23/2009 postreply
17:44:26
•
買個附加的?不會的我都去買。
-眼冒金星-
♂
(0 bytes)
()
01/23/2009 postreply
10:04:49
•
可這次可買不來,:)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
10:39:09
•
回複:大家能獻獻高見嗎:(c++)怎麽防止吃內存?
-sub101-
♂
(48 bytes)
()
01/23/2009 postreply
10:06:05
•
謝謝,看完了。文中給的方法都是very basic的知識。沒有超出
-戲雨飛鷹-
♀
(164 bytes)
()
01/23/2009 postreply
10:28:05
•
Remove Orphans
-any_mor_left-
♂
(0 bytes)
()
01/23/2009 postreply
10:37:41
•
hmmm, good one. let me google about it:) thanks!
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
10:42:33
•
不僅要配對, 還要盡早釋放(一旦object 不用了, 就release.)
-ExpectingMM-
♀
(302 bytes)
()
01/23/2009 postreply
11:33:32
•
thanks:)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
11:56:30
•
use objects on stack
-ncpga-
♂
(0 bytes)
()
01/23/2009 postreply
12:52:41
•
right.
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
13:21:49
•
use singleton
-ncpga-
♂
(0 bytes)
()
01/23/2009 postreply
12:54:34
•
why?
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
13:21:28
•
here is why
-ncpga-
♂
(222 bytes)
()
01/23/2009 postreply
13:27:58
•
thanks. u r real a guru! happy new yr!
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
13:31:58
•
those are really basics
-ncpga-
♂
(26 bytes)
()
01/23/2009 postreply
13:56:49
•
haha, absolutely :)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
14:14:07
•
use managed heap
-ncpga-
♂
(0 bytes)
()
01/23/2009 postreply
12:56:01
•
right.
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
13:22:49
•
use virtual dtor
-ncpga-
♂
(0 bytes)
()
01/23/2009 postreply
12:57:16
•
wow, wow!! thanks a lot, ncpga!!!
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
13:18:07
•
auto_ptr, STL container, RAII
-就說一句-
♂
(0 bytes)
()
01/23/2009 postreply
14:15:52
•
thanks:)
-戲雨飛鷹-
♀
(0 bytes)
()
01/23/2009 postreply
14:58:05
•
Check "Effective C++" by Scott Meyers
-lhan-
♀
(0 bytes)
()
01/23/2009 postreply
22:52:30