8
Memory Leaks
Memory leaks occur as a result of improper memory management and can directly impact the performance of an application. These leaks occur when memory is improperly deallocated or when it is allocated but becomes inaccessible. Improper memory management not only negatively impacts performance but can also hinder scalability, result in system crashes due to OutOfMemoryError, and ruin the user experience. Many developers implicitly trust Java’s garbage collector (covered in Chapter 1) to manage memory while their applications run; however, despite the garbage collector’s incredible capabilities, memory leaks are a persistent issue.
The garbage collector is not faulty; rather, memory leaks occur when the garbage collector is unable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access