None. F # has automatic memory management based on garbage collection . What causes the freeing of a block of memory is not a syntax condition, but a condition of execution. A memory block is freed after it becomes inaccessible.
, . foo
, newList
newRec
, . , newList
newRec
, , , , . foo
:
let bar (arec: MyRecord) i =
let newList = arec.AList |> List.filter (fun x -> x >= i)
let newRec = { arec with AList = newList }
newRec.AList
bar
, newRec
, newList
, .
, . , , ¹: , , , , .
foo
, foo
, newRec
newList
, , . , ; , , . , ; ( GC , , GC , ).
, foo
List.map
, . , List.map
.
¹ , , .