Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21c5fb2cf80725b

Jump to content

Talk:Object lifetime

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 2 years ago by Stevebroshar in topic Focus

Would it not better to perform some common task (like with points) in the three programming languages to show the difference? --VictorAnyakin 06:56, 14 September 2006 (UTC) .n,n,. —Preceding unsigned comment added by 210.212.103.252 (talk) 18:04, 26 February 2008 (UTC)Reply

"like with points"? "three programming languages"? "the difference"? Stevebroshar (talk) 00:58, 22 June 2024 (UTC)Reply

Focus

[edit]

Removed alot of nonsense; including the examples. This article is about lifetime which is about _how_ life starts and ends. It is only loosely related to _what happens_ when it starts and ends. If talking about behavior, then lifetime covers all behavior; not just ctor and dtor.

  • Rules for object lifetime vary between languages, in some cases between implementations of a given language. -- so generic
  • lifetime of a particular object may vary from one run of the program to another -- How is that interesting?
  • both for static variables and automatic variables -- so ... variables
  • in general, object lifetime is not tied to the lifetime of any one variable -- huh?
  • particularly those that use garbage collection (GC) – objects are allocated on the heap -- tangent
  • Further, many distinctions are drawn between the steps, and between language-level concepts and implementation-level concepts. -- so generic
  • The terms allocation and deallocation or freeing are also used, by analogy with memory management, though object creation and destruction can involve significantly more than simply memory allocation and deallocation, and allocation/deallocation are more properly considered steps in creation and destruction, respectively. -- huh?
  • This varies by language, and within language varies with the memory allocation of an object; object lifetime may be distinct from variable lifetime. -- Duplicate info
  • efn|There are various subtleties; for example in C++, static local variables are deterministically created when their function is first called, but destruction is non-deterministic. -- don't use efn and way too specific and c++ oriented

And alot more. Stevebroshar (talk) 04:50, 22 June 2024 (UTC)Reply