When trying to cut down possible memory leaks in my program, I noticed a reoccoring pattern: Move Delete closer to new, repeat, remOve the function that uses it and move code to main, move a few things to global, replace some stuff with arguments and return values, and in the end everything is in main with no pointers.
However to reassure myself that this wont have problems I want to know this : If my program doesnt use the stack or heap at all (as in me putting a new or stk()? in it) will it still have (however small) memory leaks? It was made to work forever constantly recalculating it's output every second, evaluating the time, year, day, ticks since start, CPU speed (<<in progress), so basically if you open this in DOS your doomed.
Zssffssz -4 Junior Poster
vijayan121 1,152 Posting Virtuoso
Zssffssz -4 Junior Poster
Narue 5,707 Bad Cop Team Colleague
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Zssffssz -4 Junior Poster
NathanOliver 429 Veteran Poster Featured Poster
Zssffssz -4 Junior Poster
Tumlee 42 Junior Poster in Training
MastAvalons 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.