POV-Ray : Newsgroups : povray.binaries.programming : My idea: Developers need tips! Help me, please! : Re: My idea: Developers need tips! Help me, please! Server Time
25 Apr 2024 07:31:01 EDT (-0400)
  Re: My idea: Developers need tips! Help me, please!  
From: LanuHum
Date: 12 Sep 2016 10:05:00
Message: <web.57d6b5db397eea9f7a3e03fe0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 11.09.2016 um 22:06 schrieb LanuHum:
> > We continue to
> > https://github.com/Lanuhum/Blender-C-
> > Seeking a memory leak.
>
> The name of the repo is poorly chosen: Pasting the corresponding link
> into plain text such as a mail, software that auto-detects links in
> plain text may think the trailing `-` isn't part of the link (this is
> quite obviously the case with Thunderbird).
>
> I would recommend renaming the repo to, e.g., "Blender-Cpp".
>

I gave the name of the repository blender-C++
I did not know that github does not understand plus plus
Plus, plus, he was replaced by minus.
I tried renaming, but the button "Rename" is not active. :(
:)
> > If you decide the problem - I will continue. I'll connect povray with blender.
> > :)))
>
> You're not very familiar with C++, are you?
>
> One property of C++ is that there is no garbage collection in the
> language itself, and you'll have to actively release all memory you
> allocate. Thus, in the main() function,
>
>     int main(int argc,char *argv[]){
>         FXApp application("foxray",FXString::null);
>         application.init(argc,argv);
>         new ImageWindow(&application);
>         application.create();
>         return application.run();
>     }
>
> the `new ImageWindow(&application);` will allocate memory for, and
> create, an object of type `ImageWindow`, but makes no provision to
> remember the address of the memory allocated, so there is no way to
> release the memory later.
>
> You probably want to do something like this:
>
>     ImageWindow myWindow = new ImageWindow(...);
>     ...
>     delete myWindow;
>
> One memory leak eliminated. I'll have a look whether I can find some more.

Thank you. Yes, I'm just learning. If I close the app - the memory is freed.
Memory takes each successive press of a button.
Button believes the number of vertices.
Memory: 1760
Start app. Memory: 1760
vertices number = 983042
Press button "Render" . Memory: 2380
Press button "Render" . Memory: 2750
Press button "Render" . Memory: 3100
Press button "Render" . Memory: 3470
What you need to be reset. Which variable is stored. I see no reason.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.