A memory leak may occur when:(1 point)Responsesa heap gets too large.a heap gets too large.a heap gets too small.a heap gets too small.a stack gets too large.a stack gets too large.a stack gets too small.a stack gets too small.

1 answer

A memory leak typically occurs when a program allocates memory (often on the heap) but fails to release it when it's no longer needed. This means that even though the memory is allocated, it cannot be used for other purposes, leading to a situation where the heap gets too large. Therefore, the correct response is:

A heap gets too large.