OpenText Interview Question

how garbage collector works ?