作者dryman (dryman)
看板EE_DSnP
標題[問題] ~f及_one/_zero
時間Wed Jan 20 05:09:21 2010
else if (f == ~h) h = BddNode::_one;
我想請問在這種情況下有沒有可能造成_one的reference count減少?
因為我看到我的程式
(gdb) p BddNodeInt::_terminal._refCount
$1 = 1
(gdb)
往上追會看到這一行...orz
else if (f == ~h) h = BddNode::_one;
operator =
若_nodeV為零就更新_nodeV,再incRefCount
若_nodeV不為零,則刪除原_nodeV指向的bddnodeint的refcount
再更新_nodeV,incRefcount
如果delete的話程式就會crash,不delete又會跑很慢orz
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.195
※ 編輯: dryman 來自: 140.112.4.195 (01/20 05:11)
推 a3785lexx:爆肝推一個!! 01/20 05:17
推 hrs113355:爆肝推一個++ 01/20 06:23
推 angelicdream: 推一個 科科 01/20 07:45
推 ric2k1:If h is a support, then the refCount to _one will -- 01/20 08:03
推 ric2k1:不 delete 跑很慢不一定是因為不 delete 的關係... 01/20 08:04