I'm looking for prior art related to following patent:
DECLARATION OF LIFETIME OF RESOURCE REFERENCE
A language extension that advances safety in system programming by specifying a lifetime of a reference that represents a resource. In accordance with the language extension, the lifetime references a particular scope in a manner that the compiler generates computer-executable instructions that enforce the lifetime of the reference to be a function of (e.g., no longer than) the lifetime of the particular scope. Accordingly, the resource lifetime may be specified in advance to have a particular scope. This helps in performing resource management as typical managed language programs can allow resources to exist indefinitely. Furthermore, because the resources have a defined finite lifetime, they might be more conveniently allocated on a stack, instead of on a heap, for much more efficient processing.
- A computer-implemented method for declaring that a particular reference in a software program has a finite lifetime, the method comprising:
an act of accessing a software program under construction that includes a reference that defines a resource; and
an act of annotating a reference of the software program to be associated with a particular scope having a finite lifetime, wherein the annotation is structured such that the compiler enforces a lifetime of the reference to be a function of the lifetime of the particular scope.