# How to undef a vector element

**URL:** <https://discourse.julialang.org/t/how-to-undef-a-vector-element/83427>\
**Category:** General Usage\
**Tags:** array, memory-allocation, garbage-collection\
**Created:** [June 27, 2022, 8:57pm UTC](https://discourse.julialang.org/t/how-to-undef-a-vector-element/83427 "2022-06-27T20:57:00Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Post date:** [June 28, 2022, 9:26pm UTC](https://discourse.julialang.org/t/how-to-undef-a-vector-element/83427/16 "2022-06-28T21:26:15Z")

</div>

Thanks all for your suggestions. The

const emptystuff = EmptyStuff()

route seems most palatable… except that Stuff in my case is a parametric type with T\<:AbstractFloat. Are there now better alternatives than what is suggested in [https://discourse.julialang.org/t/can-one-make-a-constant-with-a-parametric-type/39444](https://discourse.julialang.org/t/can-one-make-a-constant-with-a-parametric-type/39444) ?

---

_[View the full topic](https://discourse.julialang.org/t/how-to-undef-a-vector-element/83427)._
