Actually, you're looking at two different things. Visual Studio Online is not the Visual Studio IDE in the cloud. There is one feature of VSO that does enable you to edit code in the cloud, but it's only for websites deployed to Azure. See: Visual Studio Online "Monaco" videos on Channel 9.
Visual Studio Online is essentially a cloud implementation of Team Foundation Server with some additional cloud-based functionality. You should go ahead and create a free Visual Studio Online Basic account. That'll give you a place in the cloud for online source control. As you learn to code, you should also learn how to work with source control.
Express for Windows Desktop is the IDE heir to what was once Visual Basic Express, Visual C# Express, and Visual C++ Express. All three of those products (2010 era) are now what comprises Express for Windows Desktop. It's the best starting point for learning to code with any of those languages, and it connects to Visual Studio Online. For ASP.NET development, you'll need a separate Express product: Express for Web.
Agree with others. Go with Visual Studio Express. If you need cross platform option(some people use VMs to run other OS), use MonoDevelop[^]. FYI one more open source IDE SharpDevelop[^] there as an alternative.
Hey, all. Been after this one a few days and it's driving me crazy. I've refactored several times based on information I've found on the net (i.e. event handlers, circular references, etc) but I'm just not getting anywhere.
What I have is a generic hierarchical data structure that is distributed over a LAN via TCP. The concept was that I wanted to be able to share variables between applications over networked machines using a common protocol. The problem is whenever I run the thing and watch the process with Process Explorer, I can see a steady increase in Physical Memory usage (WS Private). I have a test application that accesses the nodes in the tree several times a second and can watch it climb (app consumes about 50 MB of memory when idle and then climbs at about 300 K per second). By playing around and commenting/uncommenting various blocks of code, I've narrowed the problem down to whenever the nodes in the tree are being accessed. At first I was certain that the problem was in the implementation of my object hierarchy because I had circular references (children had a reference to their parents) and figured that was messing up GC. But then I redid the implementation to remove that relationship and it's still happening. This is really driving me nuts.
Here's some (abridged) code. I can provide more if needed but don't want this to turn into a novel outright.
First, the object hierarchy:
Starts with a MustInherit base class: Node
Node is just a basic node in the tree. Everything that lives in the tree must inherit from this class.
Inherits from Node. It has an internal sortable dynamic list of Node instances and includes methods necessary to traverse that list (HasChildren, etc).
Inherits from ContainerNode. A Cluster is a collection of related nodes. A Cluster is the top most object in the tree. A Cluster contains a list of Groups and DataNodes.
Inherits from ContainerNode. A Group is a collection of related nodes within a Cluster. A Group contains more Groups and DataNodes.
Inherits from Node. A DataNode is a variable "leaf" item on the tree. It can be any kind of basic data type (string, integer, etc, etc).
The whole tree is accessed through a class called Agent. The Agent provides the methods necessary to add and remove nodes and set their values. It also sends changes in the tree out to the network and receives requests from connected clients over the network to modify the tree.
Nodes on the tree each have a signature, which looks pretty similar to a directory path in Linux (/Cluster/Group/Group/DataNode). I don't deal with relative paths.
So after a bunch of screwing around I've traced the problem down to whenever I access a node on the tree. Up at the App level, I have the following:
This corresponds to a property in a class called Service, which exposes the Agent and everything else to client applications (this whole thing is packed into a class library).
PublicProperty NodeValue(ByVal Path AsString) AsObjectGetReturn m_Agent.NodeValue(Path)
EndGetSet(ByVal value AsObject)
m_Agent.NodeValue(Path) = value
Within Agent, there is the following:
PublicProperty NodeValue(ByVal Path AsString) AsObjectGetTryReturnDirectCast(Me.GetNode(Path), Tree.DataNode).Value
Catch ex As Exception
ReturnNothingEndTryEndGetSet(ByVal value AsObject)
TryDim N As DataNode = DirectCast(Me.GetNode(Path), Tree.DataNode)
If (N IsNotNothing) ThenIf (N.NodeVal <> value) Then
N.NodeVal = value
If (Me.SuppressEvents = False) Then
EndIfEndIfEndIfCatch ex As Exception
GetNode does this:
PublicFunction GetNode(ByVal Path AsString) As Node
If (m_Nodes.IsEmpty) ThenReturnNothingEndIfIf (String.IsNullOrEmpty(Path)) ThenReturnNothingIf (Path.Equals("/")) Then
EndIfIf (Path.Substring(0, 1).Equals("/")) ThenReturn AbsolutePath(Path)
EndIfReturnNothingEndFunctionPrivateFunction AbsolutePath(ByVal Path AsString) As Node
Path = Path.TrimStart("/")
Dim Data() AsString = Path.Split("/")
If (Data.Length > 0) ThenDim Index AsInteger = m_Nodes.GetItemIndex(New SearchNode(Data(0)))
AbsolutePath = m_Nodes.AtIndex(Index)
If ((AbsolutePath IsNotNothing) And (Data.Length > 1)) ThenFor X AsInteger = 1To Data.Length - 1If (AbsolutePath IsNotNothing) ThenIf (AbsolutePath.HasChildren) Then
AbsolutePath = DirectCast(AbsolutePath, ContainerNode).Child(Data(X))
Now, through testing, I've found that calling GetNode is enough to make the memory leak occur. That means no events firing and nothing else special, just a simple GetNode, which returns the Node instance back to the caller.
It seems to me that this should be something that the language should be able to handle, so I'm either missing something fundamental or I'm nowhere near as knowledgeable as I'd like to believe.
I greatly appreciate any help, hints, or insight you can provide.
You're either generating more objects (and faster) than the GC can clean up and manage, or you're keeping a reference to those objects somewhere. Is there a custom paint-handler somewhere in the application?
Put the mouse on a suspicious class, and hit Shift-F12. That should give you a list of all the places where the class is being used.
Another quick and dirty way would be to implement IDisposable, and have the class log a line whenever an object is created (in the constructor) and when it is disposed of.
The best way would be to use a (commercial) memory-profiler. You'll get a nice graphic showing what's been allocated at what point. Microsoft also provides a tool of course, with their "howto" here[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Last Visit: 31-Dec-99 19:00 Last Update: 31-Mar-15 3:33