LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory leak

Hey,

 

well I wrote this program and I feel that it may be having a memory leak can any of you guys/gals help me find out why?

 

the reason I am having these feelings is because every day or so my computer loses a gig of memory or so...

 

Thanks

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 1 of 3
(2,908 Views)

I would suggest that instead of using the Snd Write Waveform VI you use its subVIs instead, and set up your VI so that the configuration is done before the loop starts, and you clear the sound configuration after the loop ends. You should also use the sound VIs from the palette. Look at the examples thatship with LabVIEW.

 

I can't figure out what you're doing with your front panel and your code. You appear to have a transparent tab control. Why?  You also appear ready to to use a decoration as a button (based on the text "Click this to start a new Tempo". Again, why? What is the purpose of an LED to tell you the state of the switch? Can you not see the switch? Is the BPM control supposed to affect the sound? Are you simply trying to play a "beep"-like sound at a specific rate? 

 

Other comments:

  • You are converting the output of the sine wave generator to U8, but the addition coerces it to I32 since your constant of 64 is I32. Then you have an additional coercion  back down to 8-bit. Change the datatype of the constant to U8.
  • Use the Reciprocal function instead of the Divide function to get 1/x. 
  • You are initializing an I32 integer with 0, adding 1 right away, and then checking if the integer is greater or equal to 1. This must be true, by definition. You are never decreasing this integer, so what's the point of the comparison?
  • ...

Message 2 of 3
(2,890 Views)

well as this is an example of the actual program I slapped together I will look to see if any of these things are causing my problem

 

thanks

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 3
(2,884 Views)