Dereference C# labview

This is a discussion on Dereference C# labview within the labview forums in Programming Languages category; Hello, I try a LabView project with DotNet DLL.I've out parameter in my function, like this ublic void funcOut( out Bidon bidon )In LabView, I'm using "close reference". In my code I'm counting number of reference of my param bidon. In execution the number of reference grow and down.But if I'm starting perfmon, adding DotNet memmory counter. The graph is allways growing. It's normaly ?Thanks Class11.cs: http://forums.ni.com/attachments/ni/...0/1/Class11.cs LabViewCS1.png: http://forums.ni.com/attachments/ni/...LabViewCS1.png Perfmon1.png: http://forums.ni.com/attachments/ni/...3/Perfmon1.png...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-09-2008, 04:40 AM
mdauphin
Guest
 
Default Dereference C# labview

Hello, I try a LabView project with DotNet DLL.I've out parameter in my function, like this ublic void funcOut( out Bidon bidon )In LabView, I'm using "close reference". In my code I'm counting number of reference of my param bidon. In execution the number of reference grow and down.But if I'm starting perfmon, adding DotNet memmory counter. The graph is allways growing. It's normaly ?Thanks


Class11.cs:
http://forums.ni.com/attachments/ni/...0/1/Class11.cs


LabViewCS1.png:
http://forums.ni.com/attachments/ni/...LabViewCS1.png


Perfmon1.png:
http://forums.ni.com/attachments/ni/...3/Perfmon1.png
Reply With Quote
  #2  
Old 07-09-2008, 12:40 PM
smercurio_fc
Guest
 
Default Re: Dereference C# labview

I don't believe this is a LabVIEW issue. The same thing happens if your class is called from a C# app. The problem lies in the .NET garbage collection. The destructor for a class can't be called directly. The .NET Garbage Collector will call the destructor(s) "as needed". You can, however, explicitly call the Garbage Collector via System.GC.Collect(). What I don't know is if the LabVIEW<->.NET interface will automatically call the Garbage Collector when the references are all closed out.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:21 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.