Working on stack being destroyed