Memory Management (day 3) Flashcards

1
Q

Stack and heap

A

All locals variables and method invocations stored in stack

All objects along with instance variables stored in heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Memory leak

A

Resource is not deallocated; stuff we can’t manage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Garbage collecter

A

Automatically deallocates memory used from reasourses. Prevents memory leak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Eligibility of garbage collection

A

If there’s a break between a stack and it’s heap. The heap can be collected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly