Programming-Idioms

History of Idiom 209

Idiom #209 Type with automatic deep deallocation

Declare a type t which contains a string s and an integer array n with variable size, and allocate a variable v of type t. Allocate v.s and v.n and set them to the values "Hello, world!" for s and [1,4,9,16,25], respectively. Deallocate v, automatically deallocating v.s and v.n (no memory leaks).

#Edit dateEdit SummaryAuthor
👁 Δ 11 2020-03-20, 17:33 New Go implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 10 2020-03-20, 17:27 [Rust] Variable name v (idiom statement was updated to clarify) programming-idioms.org
👁 Δ 9 2020-03-20, 17:26 Variable name should be v for consistency programming-idioms.org
👁 Δ 8 2020-03-17, 13:37 New Rust implementation by user [CeaselessBanana] CeaselessBanana
👁 Δ 7 2019-11-25, 23:46 New Ruby implementation by user [steenslag] steenslag
👁 Δ 6 2019-11-07, 14:46 New Python implementation by user [Oldboy] Oldboy
👁 Δ 5 2019-10-02, 16:00 New Pascal implementation by user [Bart] Bart
👁 Δ 4 2019-09-30, 11:24 New Perl implementation by user [daxim] daxim
👁 Δ 3 2019-09-30, 08:04 I did mean deallocation :-) tkoenig
👁 Δ 2 2019-09-30, 08:00 Fix markup tkoenig
1 2019-09-30, 08:00 Idiom creation by user [tkoenig] tkoenig