Could this generate memory leakage?

Could this potentially generate memory leakage?

  def save_weights(error)
    best_error = error
    best_weights = Marshal.load(Marshal.dump(weights))
  end

This code runs several 1000s of times, making a copy of the best
configuration for a network. best weights always points at the copy of
best weights… but I don’t know what happens to the other copies that
are no longer being pointed at. Ruby does garbage collection, right?

Ted.

On Tue, Nov 30, 2010 at 9:16 AM, Ted F. [email protected]
wrote:

are no longer being pointed at. Ruby does garbage collection, right?
Yeah, no problems with that.