# Boolean trouble or something

**URL:** <https://discourse.processing.org/t/boolean-trouble-or-something/16217>\
**Category:** Beginners\
**Created:** [December 7, 2019, 2:13pm UTC](https://discourse.processing.org/t/boolean-trouble-or-something/16217 "2019-12-07T14:13:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 7, 2019, 2:38pm UTC](https://discourse.processing.org/t/boolean-trouble-or-something/16217/5 "2019-12-07T14:38:44Z")

</div>

> [@ddownn](#):
>
> Does `pressLoc = m` create some kind of persistent “link”?

- Variables/fields/parameters store a single value.
- They range from 1 byte to 8 bytes in most languages.
- At the statement `m = new PVector();` the operator `new` creates a contiguous memory block enough to fit in all PVector’s non-`static` fields.
- And when it’s done, it returns the 1st memory address of that block.
- And finally, that 1st memory address is stored in the field _m_ as a reference value.
- Now, when you do `pressLoc = m`, you’re assigning field _pressLoc_ w/ the exact value of _m_.
- After that assignment, both _m_ & _pressLoc_ fields point to the same PVector object, b/c they now store the same 1st memory address value of it.
- In other words, they’re now alias to the same object.

---

_[View the full topic](https://discourse.processing.org/t/boolean-trouble-or-something/16217)._
