---
title: "Discussion on \"How memory is stored in Stack and Heap. The in-depth discussion to tackle all Questions on Stack and Heap memory!\" | Hashnode"
description: "Discussion on \"How memory is stored in Stack and Heap. The in-depth discussion to tackle all Questions on Stack and Heap memory!\". Why is Stack memory faster? Variable of Heap memory stored in Stack? Pass by reference occurs in Heap Memory or Stack Memory? What causes Memory Leak?"
url: "https://hashnode.com/posts/questions-on-stack-and-heap-memory/67a87228ab42e3bb89d6bb0c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How memory is stored in Stack and Heap. The in-depth discussion to tackle all Questions on Stack and Heap memory!](https://rambhardwaj.hashnode.dev/questions-on-stack-and-heap-memory?utm_source=hashnode&utm_medium=feed)

Why is Stack memory faster? Variable of Heap memory stored in Stack? Pass by reference occurs in Heap Memory or Stack Memory? What causes Memory Leak?

Feb 9, 2025 · 3 min read · rambhardwaj.hashnode.dev  
Read the article

-   [#stackvsheap](https://hashnode.com/tag/stackvsheap)
-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#oops](https://hashnode.com/tag/oops)
-   [#object-oriented-programming](https://hashnode.com/tag/object-oriented-programming)
-   [#stackoverflow](https://hashnode.com/tag/stackoverflow)
-   [#heap-memory](https://hashnode.com/tag/heap-memory)
-   [#memory-leak](https://hashnode.com/tag/memory-leak)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)

## Written by

[Ram Bhardwaj](https://hashnode.com/@rambhardwaj1010)

@rambhardwaj1010 · India

  
[View profile](https://hashnode.com/@rambhardwaj1010)

Software Engineer @Ciena

Engineer @Ciena | Software Engineering | Full Stack Development | Typescript , Java, React Node | DSA LeetCode (600+) | System Design |

## Responses 1

Markdown supported · ⌘↵ to post

[Renil Garala](https://hashnode.com/@renilpatel)

[Feb 9, 2025](https://hashnode.com/posts/questions-on-stack-and-heap-memory/67a87228ab42e3bb89d6bb0c/comment/67a880aef4a0077b8ea1a2c9)

really amazing bro, now i got this concept 🥰

[Ram Bhardwaj](https://hashnode.com/@rambhardwaj1010)

[Feb 9, 2025](https://hashnode.com/posts/questions-on-stack-and-heap-memory/67a87228ab42e3bb89d6bb0c/comment/67a880aef4a0077b8ea1a2c9#reply-67a8d2d65ad830a0abc743e8)

Glad I could help!
