[問題] 刪除new出來的instance(from class)
想請問一下 怎麼刪除自己new出來的一個class?
class Test1
...
end
a = Test1.new
b = Test1.new
怎麼把new出來的a這個class刪除?
翻了一下書都是刪hash, string或是array
好像沒看到刪掉一個new出來的class@@
= = = = = = = = = = = = = == = = = = = = = = = = = = = =
阿...
我的意思是, 前面不是建立了一個叫Test1的class
而a和b分別是這個類別Test1所new出來的object
那我要怎麼去刪除a這個new出來的object?
(整個刪除, 不是只刪裡面所定義的值)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.229.7.184
推
02/08 00:57, , 1F
02/08 00:57, 1F
※ 編輯: skyboy 來自: 125.229.7.184 (02/08 01:11)
推
02/08 01:11, , 2F
02/08 01:11, 2F
推
02/08 01:17, , 3F
02/08 01:17, 3F
→
02/08 01:17, , 4F
02/08 01:17, 4F
※ 編輯: skyboy 來自: 125.229.7.184 (02/08 01:28)
→
02/08 01:34, , 5F
02/08 01:34, 5F
→
02/08 01:35, , 6F
02/08 01:35, 6F
→
02/08 01:36, , 7F
02/08 01:36, 7F
推
02/08 01:36, , 8F
02/08 01:36, 8F
→
02/08 01:40, , 9F
02/08 01:40, 9F
推
02/08 01:43, , 10F
02/08 01:43, 10F
→
02/08 01:43, , 11F
02/08 01:43, 11F
→
02/08 01:51, , 12F
02/08 01:51, 12F
→
02/08 01:51, , 13F
02/08 01:51, 13F
→
02/08 01:57, , 14F
02/08 01:57, 14F
→
02/08 01:58, , 15F
02/08 01:58, 15F
→
02/08 01:59, , 16F
02/08 01:59, 16F
→
02/08 02:00, , 17F
02/08 02:00, 17F
推
02/08 02:02, , 18F
02/08 02:02, 18F
討論串 (同標題文章)
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章