I'm not sure, but I think it may overload the machine only when it runs out of memory. It should be after drawing hundreds of objects. You said the problem raises after 2 or 3 objects, it sounds to me there is something wrong with your code.
Can you provide the whole code or the runable program so we can test and inspect?