object-pooling-demo
This is a Unity 3D demonstration with C# scripting. By utilizing a technique known as object pooling, you can deliver an infinite supply of a candy GameObject while only ever instantiating a set number that is recycled, keeping overhead low and avoiding the need for garbage collection.
A working copy of this demo implemented in the Unity 3D web viewer (currenltly Safari, Firefox, and IE only) is avaiable at the following URL: https://s3-us-west-1.amazonaws.com/collapsiblemedia.com/candy+pooling+demo/candy+pooling+demo.html