D
dtuttle1
Hi - I have a memory and cpu-constrained embedded app. There's a long-
running loop with a local object (buffer) which eats up memory. A
GC.start on every iteration will reclaim it, but that eats the cpu.
Is there a way to deallocate the memory used by the temporary objects?
file = File.new file_path
while buffer = file.read(512)
stream_host_connection.write buffer
stream_host_connection.flush
# GC.start - too expensive
end
Thanks, Dave
running loop with a local object (buffer) which eats up memory. A
GC.start on every iteration will reclaim it, but that eats the cpu.
Is there a way to deallocate the memory used by the temporary objects?
file = File.new file_path
while buffer = file.read(512)
stream_host_connection.write buffer
stream_host_connection.flush
# GC.start - too expensive
end
Thanks, Dave