Author Topic: is this a memory leak  (Read 3065 times)

0 Members and 1 Guest are viewing this topic.

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
is this a memory leak
« 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.  

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: is this a memory leak
« Reply #1 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.
You're not done when it works, you're done when it's right.

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
Re: is this a memory leak
« Reply #2 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