1. Win32 Calendar program

"DaJaRo" posted a Win32 calendar the other day. Small problem: it has memory
leaks. I couldn't find an e-mail address in the documentation, so I'm
posting here.

For reasons that are entirely unclear to me, "DaJaRo" choseto implement
their string functions by poking the strings into memory, and directly
manipulating memory. The functions look roughly like:

    function foo( sequence bar )
        memory = allocate( 1000 )
        ...
        return result
        free( memory )
    end function

The problem is that when Euphoria sees the "return", it exits the function.
So the call to free() never gets made, and so the memory is never freed. I
suggest writing the routines in "pure" Euphoria. It's plenty fast, and as a
bonus, you don't have to worry about memory leaks like this.

-- David Cuny

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu