# Create a type with pointer to array

**URL:** <https://discourse.julialang.org/t/create-a-type-with-pointer-to-array/1306>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 5, 2017, 4:29pm UTC](https://discourse.julialang.org/t/create-a-type-with-pointer-to-array/1306 "2017-01-05T16:29:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonbyrne/32/19_2.png) [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Post date:** [January 5, 2017, 4:55pm UTC](https://discourse.julialang.org/t/create-a-type-with-pointer-to-array/1306/2 "2017-01-05T16:55:07Z")

</div>

> [@mzilhao](#):
>
> My understanding is that both A and B now contain two copies of my Coord type, right? ie, A.coord and B.coord are independent and are each occupying space in memory.

No, `A.coord` and `B.coord` are the same object:

```julia
julia> A.coord === B.coord
true

```

---

_[View the full topic](https://discourse.julialang.org/t/create-a-type-with-pointer-to-array/1306)._
