Creational Design Pattern : Object pool code.