 OnlyOne
		
			OnlyOne
		
		
		
		
		
		
		
		
	
			05-04-2011 03:51 AM
Hello,
i have a cluster of references where i use unbundle to get the needed reference and then "Propery: Value" to set the value.
Do i have to close the reference after this action? Does it need memory when not closed?
Or is this automatically done?
Thanks for help
 Sletten
		
			Sletten
		
		
		
		
		
		
		
		
	
			05-04-2011 05:01 AM
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			05-04-2011 07:26 AM
The recommended practice is to close all references in order to avoid memory leaks.
Ben explained the following:
"Repeatedly opening and closing ref's will eat up memory because there are resource allocated for each open. The close does not delete these resource (memory) but only marks them as available for deletion. The clean-up only happens when the VI goes idle (ie: stops running gracefully)."
 Darren
		
			Darren
		
		
		
		
		
		
		
		
	
			05-04-2011 10:13 AM
You never need to close control references...they'll be cleaned up by LabVIEW when your VI goes idle.
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			05-04-2011 11:29 AM
@Darren wrote:
You never need to close control references...they'll be cleaned up by LabVIEW when your VI goes idle.
Would that be acceptable in a CLD exam? 😉
 Darren
		
			Darren
		
		
		
		
		
		
		
		
	
			05-04-2011 02:21 PM
@Ray.R wrote:
Would that be acceptable in a CLD exam? 😉
If I were grading a CLD, I would not take off for unclosed control references. Then again, I've never graded a certification exam. 🙂
I'll relay my feedback to the certification team that control references need not be closed.
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			05-04-2011 05:26 PM
Thanks Darren 🙂