The argument size determines the size of the generated depth maps, they will be (size x size) pixels. When a rendering is performed after this function has been called, the generated depth maps are used to create the shadows in the scene. The depth maps are not deleted automatically afterwards. This is very useful if a static scene is rendered several times, perhaps from different viewpoints, since the time to generate depth maps is only spent once.
Another usage is to generate the depth maps before some of the objects are installed in the scene, if it is certain that they will never cast a shadow on any other object (a floor being a typical example). The depth map generation will the be considerably faster since fewer objects need to be rendered. When the remaining objects are installed, the rendering can be started and shadows is still cast on them but not from them.