ID:2838465
 
BYOND Version:515.1596
Operating System:Windows 10 Home 64-bit
Web Browser:Firefox 107.0
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary: When a list of /atom references is used as a list for input(), the reference that is created is sometimes held for seemingly long periods of time before being cleared (usually between 2900 to 3000 ticks - about 5 minutes).

Numbered Steps to Reproduce Problem:
1) Download the following test project: http://files.byondhome.com/Higoten/Tests/Input%20Test.zip
2) Compile and run the project. Use the Test() verb.
3) Select test1 and click OK.
4) Wait about 5 minutes. Observe that the object has been garbage collected after about 2950 ticks.

These results can be contrasted by the results of the following steps, which produce the desired behavior.

5) Compile and run the project downloaded in Step 1 above. Use the Test() proc.
6) Click the Cancel button.
7) Use the Test() verb.
8) Select test1 and click OK.
9) Observe that the object is garbage collected instantly.


Expected Results: For the references generated by the Input() proc to be garbage collected after the input has been answered and is no longer able to be used.

Actual Results: In some circumstances, it takes around 2950 ticks for the references generated by Input() to be garbage collected.

Does the problem occur:
Every time? Or how often? Unknown.
In other games? Untested.
In other user accounts? Untested.
On other computers? Yes.

When does the problem NOT occur? Steps 5-9 provided above demonstrate that there are circumstances where the issue does not occur.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? No. This appears to be old behavior, tested to BYOND 354.

Workarounds: Create a temporary list populated with non-referencing values (such as names) from the original list, and pass that list to Input(), then use the return value to obtain the /atom from the original list.
I've seen Lummox acknowledge this as not being a bug in the past. Before I even clicked on it, I thought to myself: "The server retains references to objects passed to inputs for 5 minutes.", as I've seen this reported before.

What I don't understand is why the client can't notify the server that it's done with the reference list and have the server clean up the references.
In response to Ter13
After I had tested older versions and found the same behavior going all the way back, I figured this may have been intentional (perhaps for caching purposes in frequent inputs?). Then I stumbled on the situation listed in steps 5 to 9 above, where the references are discarded immediately. It seems inconsistent and it is possible I have the desired behavior backwards in the report, if the 5-minute reference retention is intentional.
Looking more at this issue, the behavior in steps 5 to 9 listed above is a result of how identically named objects in the input() list are stored, and does not actually demonstrate a variation in behavior. Given that the 5 minute reference hold is intended, then this can be marked as not a bug.