QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: badger on October 02, 2020, 08:24:08 pm

Title: is this a memory leak
Post by: badger on October 02, 2020, 08:24:08 pm
Hello

If you use a goto to leave a select case statement does that leave a memory leak like in the following code

badger

Code: QB64: [Select]
  1.         CASE CHR$(88): RETURN 'X
  2.         CASE CHR$(28), null: GOTO inv2 ' enter key or ""
  3.         CASE ELSE
  4.                 GOSUB dupidsearch
  5.                 IF iflag3 = 1 THEN
  6.                         GOSUB inventoryrec_null
  7.                         iflag3 = 0
  8.                         GOTO inv1
  9.                 END IF
  10.                 senventoryrec.id = sr
  11.                 GOSUB inv0
  12.                 GOTO inv2
  13.  
  14.  
Title: Re: is this a memory leak
Post by: STxAxTIC on October 02, 2020, 08:36:27 pm
It shouldn't - but don't take anyone's word for it.

Run the program with task manager open and watch the memory usage over time.
Title: Re: is this a memory leak
Post by: badger on October 02, 2020, 08:45:46 pm
Hello

thanks very much i will do that when i have debuged this section of my program i have a lot of rem statements between the sections of the software and there are a lot of them but i am at 826 lines but about a third or those rem statements ..

Badger