navik6459 / darkbasicpro

Automatically exported from code.google.com/p/darkbasicpro
0 stars 0 forks source link

dbStr() does runaway memory allocations #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call dbStr() at least once per frame.
2. Run the program, and open the Windows task manager.
3. Watch the allocated memory climb each second. 

What version of the product are you using? On what operating system?
Windows XP Pro - 32 bit.

I've confirmed this on my version of the open-source (based on r111 here), and 
also in the 2010 Release version. This bug had been submitted multiple times in 
the forums since 2006. Yet it still remains.

Please provide any additional information below.
The amount is very tiny. But if you call dbStr() a few times per frame, and use 
the program for several hours straight, it becomes a serious problem!

Such a function could either take a char* as input, so there is no allocation 
issues at all. Or there could be a single global allocation done at start-up 
that's re-used for each function call. Either way, there's no necessity for 
this function to have run-away memory allocations.

Original issue reported on code.google.com by pcowe...@yahoo.com on 5 Jun 2014 at 9:03