|
|
In article <39eb0544@news.povray.org> , Warp <war### [at] tagpovrayorg> wrote:
> This is a big problem in C (and bad-written C++ as well). As the program
> gets bigger and bigger it becomes harder and harder to keep track of
> memory allocations (and other resources as well) that need to be freed.
> This is because there's no easy way to automatize the construction and
> destruction of objects in C (we can speak of objects since povray is largely
> object-oriented although it's written in C).
POV-Ray has build-in memory management. Depending of compile-time settings
it can either just keep track of all allocated memory and free it at the end
of a render (i.e. after the last frame of an animation has been rendered),
or even create a log file of all not freed blocks of memory, together with
the line in which they were allocated. There are some more options, but
just look for yourself in mem.c/pov_mem.cpp. Usually this is a big help in
finding leaks.
Thorstem
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|