开发者

dispose ruby class object

  • how to dispose an object in ruby...?

class Designer
    def message
      "He开发者_StackOverflowllo, World!"
    end
end

c = Designer.new

c.dispose # this is not working... any idea... or any alternative...?


thnx...


class Designer
    def message
      "Hello, World!"
    end
end

c = Designer.new

# something like dispose :)
c = nil

# and you can add something like this
GC.start
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜