There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
But this sort of thing usually amounts to rearranging the deck chairs on the Titanic. More likely your problem is that you are creating a large number of objects and adding them to some kind of collection. Or generating enormous strings. Or something else which involves storing all your data in memory.Rachel Kozlowski wrote:I am currently setting my variables to null at certain points of my code and removing object declarations from inside For-Loops.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
Lucas Franceschi wrote:...to make sure it will not be out of memory, under any circunstances.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:
Lucas Franceschi wrote:...to make sure it will not be out of memory, under any circunstances.
That's a pretty bold statement. Reminds me of the time some guy allegedly said "Why would anyone EVER need more than 640k of memory?"
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
look at this:
i am working with jasper reports,
today I got the same problem you got, out of memory.
solution?
view plaincopy to clipboardprint?
JRFileVirtualizer virtualizador = new JRFileVirtualizer(50);
reportParametersMap.put(JRParameter.REPORT_VIRTUALIZER, virtualizador);
JRFileVirtualizer virtualizador = new JRFileVirtualizer(50);
reportParametersMap.put(JRParameter.REPORT_VIRTUALIZER, virtualizador);
Rachel Kozlowski wrote:Lucas, I am still having the same problem. Where in the code would I put this?
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
Rachel Kozlowski wrote:I may be doing something incorrect. As another person from this forum noted Jasper Reports put out demo code and I looked at it and the syntax is slightly different from yours.
The snippet from the sample is different. Notice that they have it writing to a tmp file and also notice that the virtualizer is included in the fillReport syntax. I am going to try this next. You should also give it a shot.
The entire Sample is below:
...
Lucas Franceschi
Software Developer for SGI Sistemas, lukas1596@gmail.com
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|