# Way to view struct objects and memory impact?

**URL:** https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082
**Category:** General Usage
**Tags:** question
**Created:** [March 31, 2018, 2:59am UTC](https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082 "2018-03-31T02:59:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)
#### Post date: [March 31, 2018, 2:59am UTC](https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082/1 "2018-03-31T02:59:50Z")

</div>

I’m trying to find objects that might be lingering around after they’re useful.

Is there a tool that helps you find these memory hogs?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 31, 2018, 9:25am UTC](https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082/2 "2018-03-31T09:25:20Z")

</div>

What do you mean with “linger around”?. If they are really lingering around with no way to access them then the GC will take care of it.

---

<div class="post-metadata">

### Author: ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)
#### Post date: [March 31, 2018, 1:31pm UTC](https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082/3 "2018-03-31T13:31:08Z")

</div>

> [@kristoffer.carlsson](#):
>
> lingering around with no way to access them

That wasn’t what he asked, he asked about objects lingering “after they’re useful”.

Objects linger around because there is some reference you weren’t aware of, keeping the GC from removing it. Also, I’m not sure how well the GC does if you have a circular reference.  
Another issue is that objects allocated outside of Julia, where they may hold lots of resources (not just memory, but also things like open file handles), may not get freed quickly by the GC, because the GC only “sees” the size of objects allocated in Julia, and it may be quite a while before they are GC’ed and their finalize method called.

---

<div class="post-metadata">

### Author: ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)
#### Post date: [March 31, 2018, 2:33pm UTC](https://discourse.julialang.org/t/way-to-view-struct-objects-and-memory-impact/10082/4 "2018-03-31T14:33:02Z")

</div>

There’s `whos()`, but I find it only moderately useful…
