It's referencing the port, not the other way around.
Well yeah, technically that's true, but then again I would've thought the setPort function would cause the port to also store a back reference to the roUrlTransfer. Or at least something (the networking module?) would store a reference to any objects that are actively involved in a current network transaction.
I guess my point is that in most garbage-collected languages you don't have to worry about that sort of thing, because if anything has a reference to an object it won't be deallocated, and if nothing has a reference to an object, the object can no longer be functionally part of the program, so it doesn't matter if it is deallocated. Obviously Brightscript is different in that regard, since you have to take explicit steps to make sure something doesn't get deallocated when it is still in use. This is almost reminiscent of creating an object on the stack in C or C++.
Anyway, I've now read up on how Brightscript's garbage collection works, and I'll watch out for this sort of thing. Thanks for your help.