Added releases for memory allocations