992452 wrote:Okay. Well, as you know, there's no direct memory management in Java.
i'm a programmer with extensive programming knowledge about C++ and hence i know about memory management....
I have made this small little program in Java:Why on earth?
but the thing is, that if i run this program for a long time, it says something like memory couldn't be allocated or something like that.What's "long time"? And what OS are you on? And what's the exact error message?
all i wanna do is delete the current thread before starting the new one...Well, you can't delete threads. Even though there's the Thread.stop() method, it's been deprecated.
baftos wrote:Would be something. Although I really can't be @rsed to go and install a C++ development environment to compile and try it out :/ I'm terrible like that.
I would like to see the equivalent C++ code that does not misbehave. I am not being sarcastic or anything, just curious.