FLTK logo

Re: [fltk.general] is there anything i can do about these (font lib) leaks?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: is there anything i can do about these (font lib) leaks? Greg Ercolano Apr 25, 2021  
 

On 4/25/21 7:45 AM, Ian MacArthur wrote:

[..]
Taking to heart their lecturers exhortation to ensure they delete all the widgets that had been new’d, they set about “fixing” the “errors” in the codebase where it closed down without formally releasing all the widgets.

Net result? A slew of complaints from the end users that now, when they click exit, the app sits there for “like, 5 minutes” and then shuts down, whereas before it just closed “straight away”.
So, what happened here is that the “improved” code was now spending a significant time (not 5 minutes, but still noticeable) working it’s way through deleting everything, whereas previously it was simply exiting and allowing the OS to reap the released memory automatically.

The student was made to take out the improvements, and was enlightened.

    Nicely worded!

    Yeah, even early popular commercial applications had this problem too; I can't remember if it was
    SoftImage or Maya, but yeah, it would literally take minutes to exit the program because of all the
    destructors being called.

    Solution was easy enough, make an extra button in the UI that simlpy called _exit() and a wrapper script
    handled removing the temp files the program left behind.. exit time was now less than a second, lol

    For other programs that didn't allow custom exit buttons to be added, a tool that simply killed
    the running program's PID with 'kill -9', then a 'waitpid / rm of tmpfiles' sufficed.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/a8ec4207-8654-0ede-3159-5e726c61e3f6%40seriss.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.