[prev] [index] [next]

Memory (cont)

Within a program, data objects have scope and lifetime

Scope: region of program in which an object is known

  • applies at compile-time
  • affects how compiler interprets/translates program
Lifetime: extent of execution during which an object exists
  • applies at execution time (run-time)
  • determined by how/where object is defined