Execute function question

Hello

Suppose I have a LS schedule agent to run every 5 min.

In one Script Lib I declared a global variable like this:

Public x_ as Variant

And I have a function like this:

Function createObj( className As String ) As Variant

Execute {Set x_ = New } & className & {()}

Set createObj = x_

End Function

Do you think this may cause a problem?

Is it possible that at some point LS delete the created object before the end of the program?

Or Is it possible LS never delete the object at all causing a memory leak?

Thanks