in my model, I have:
in my controller I have
if(@socket == nil)
@socket = TCPSocket::new(@channel.serverip, @channel.port)
I have a dropdown list in the view that lets the user select a
different channel, thus, the socket is created in the view based on
the ip and port of the selected channel.
Usually, however, the channel info will remain the same. So I am
wondering how I can make the socket persist from one POST/GET
operation to the other, unless the channel has changed.
And my second question is, if I someone does tell me how I can make it
persist, do I run the risk of some sort of memory leaks here with
this? I wonder because I have a solitary TCPSocket object which would
then be reassigned -- does the un-assigned old reference that socket
contained go automatically out of scope and get garbage collected?
Thanks, Janna B
repeatedly in my controller, naturally,