about summary refs log tree commit diff stats
path: root/docs/CHANGES2.8
# Program to detect bug #1796 reliably

type
  Node = ref object
    a, b: Node
    leaf: string

proc createCycle(leaf: string): Node =
  new result
  result.a = result
  shallowCopy result.leaf, leaf

proc main =
  for i in 0 .. 100_000:
    var leaf = "this is the leaf. it allocates"
    let x = createCycle(leaf)
    let y = createCycle(leaf)

main()
Commit message (Collapse)AuthorAgeFilesLines
* snapshot of project "lynx", label v2-8-1dev_2Thomas E. Dickey1998-03-181-1/+0
|
* snapshot of project "lynx", label 2-8rel_3