Page MenuHomeFeedback Tracker

Passing `ref` to a templated type does not keep its reference
Assigned, UrgentPublic

Description

Here's some quick code you'll need to experiment with this:

class TemplateType<Class T>
{
	T value;

	static typename GetType()
	{
		return (new TemplateType<T>()).Type().GetVariableType(0);
	}
}

Running both of these lines will result in the same print...
Print(TemplateType<ref Managed>.GetType());
Print(TemplateType<Managed>.GetType());

SCRIPT       : Managed
SCRIPT       : ScriptDebugger: remote script executed successfully.
SCRIPT       : Managed
SCRIPT       : ScriptDebugger: remote script executed successfully.

If they were referenced, they would be @Managed.

Also... their memory references just get deleted.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

Geez changed the task status from New to Assigned.Aug 1 2023, 10:40 AM