ID:2772176
 
Resolved
refcount() has been added to the language, which will return the number of references for a given object. If that object does not use reference counting, the result is zero.
Applies to:DM Language
Status: Resolved (515.1590)

This issue has been resolved.
It would be useful for custom garbage collection schemes + debugging such schemes if we could access he reference count of a datum with some method.
I know BYOND already internally stores this.
Lummox JR resolved issue (Not Feasible)
This has been brought up before. It's unfortunately not possible. The primary reason is that the very act of loading a value for the proc and putting it on the stack would distort the reference count. There are temporary vars inside of a proc that might hold refs, so those would also be relevant.
Screw it. It's in for 515.
In response to Lummox JR
I think even so people can take that in for account and still get a rough idea of how many references they have left to get rid of. A lovely feature
The promised day has arrived
Lummox JR resolved issue with message:
refcount() has been added to the language, which will return the number of references for a given object. If that object does not use reference counting, the result is zero.