How smart is Garbage Collection when it comes to nested references?
Take this code for example:
Public Class SomeClass
Private m_SomeOtherClass(Me)
End Class
I know that GC works by looking at how many references remain, and any object without any references ends up getting dumped. So in this case, where there's a reference comi...
Is it possible to list all references of an object, while debugging in Visual Studio. I am using C#. I am looking for something similar to what GC does during garbage collection.
...
hi guys,
i just manage to get myself in a tight spot, it seems our company is playing with the idea of developing a microsoft multipoint app, and the funny thing is that we're not really much of a .net developer, as we're mostly just LAMP guys with Perl.
and to top it off, i need to provide some estimate to my boss about how long develo...
I have two projects in a solution, one is a C# library and the other is a C++/CLI library.
I have added a reference in the C++/CLI project using the references menu to the c# library. I then add the
#using <assembly.name.dll>
and try to reference the assembly with
using namespace namspace.subnamespace;
But i get the error that t...
Hi,
C++ references have two properties:
They always point to the same object.
They can not be 0.
Pointers are the opposite:
They can point to different objects.
They can be 0.
Why is there no "non-nullable, reseatable reference or pointer" in C++? I can't think of a good reason why references shouldn't be reseatable.
Edit:
The ...
I'm a rusty programmer attempting to become learned in the field again. I've discovered, fitfully, that my self-taught and formal education both induced some bad habits. As such, I'm trying to get my mind around good design patterns, and -- by extension -- when they're wrong. The language is Java, and here's my issue:
I'm attempting to ...
I have a web site project in vs2008. When you add a reference to a dll, it simply copies the dll into the bin directory. I do not like to check in the bin directory into version control. Any ideas on how to make the reference work without converting to a web application (I'm just doing maintenance on an existing site).
...
After reading a question on the difference between pointers and references, I decided that I'd like to use references instead of pointers for my class fields. However it seems that this is not possible, because they cannot be declared uninitialized (right?).
In the particular scenario I'm working on right now, I don't want to use normal...
I am writing a library in C++ and have some functions that work with modules. An example would look like this:
void connect(Module *a, Module *b);
The problem is, that it would be sometimes handy if the function accepted also references (some of the Modules may be allocated on the stack and some on the heap and all the &s and *s get b...
I'm looking for a list of things left out of the Compact Framework, so I don't have to stumble over each one. For instance, I've just discovered the Message struct is not directly available. No big deal, but I spent an hour thinking I had done something wrong, since all the compiler says is "Are you missing a using statement?".
...
duplicate:
Difference between pointer variable and reference variable in C++
What does Class& mean in c++ and how is it different from Class*?
Class& foo;
Class* foo;
...
I am defining some Expression variables in my app and need to have a reference to Microsoft.Scripting.Core. That assembly includes the same namespace as the System.Core assembly from the main .Net framework.
I want to use the defintions from the System.Core assembly as it's stable whereas the Microsoft.Scripting.Core is alpha.
How do I...
I've tried to Google this issue, and I can't find anything that I see as relevant. So I must be looking for the wrong thing; none the less, I'd appreciate some advice...
Foobar &foobar = *new Foobar(someArg, anotherArg);
Is it just me or does that seem smelly?
I understand that the new keyword is designed for use with pointers (as su...
This is a little subjective I think; I'm not sure if the opinion will be unanimous (I've seen a lot of code snippets where references are returned).
According to a comment toward this question I just asked, regarding initializing references, returning a reference can be evil because, [as I understand] it makes it easier to miss deleting...
In a particular script I'm writing, I have a number of objects which are linked to some DOM Elements. Given that each element has a unique id, should each object keep just the element's id (and use document.getElementById each time), or store the element in a property?
Here's a simplified example of what I mean:
function myThing(elId) ...
Hi,
I've declared the following hashmap:
HashMap<Integer, Hive> hives
Where Hive is an object.
If I call "hives.get(2)" will it return a copy of the object Hive at that location or a reference to it?
My goal is to modify the Hive object at that location. If it returns the reference, I can just modify the returned hive and be don...
Strangely enough, this is not on The Google. And I could really use a list so I know which ones I need to remove.
...
I have been reading the descriptions of referencing in Java, and, while I feel I understand them, I am not sure if Java allows me to do the following: we have two threads in the same JVM communicating via sockets, and we would like to pass what is essentially the address of a large chunk of data across the socket, without copying the dat...
Hello,
I was wondering if anyone could tell me if what I'm trying to accomplish is possible.
I am using C# in VS 2008.
I have two project templates and another template which links the two projects and calls their templates. The first project is a user control and the second is a test app that needs to reference the user control. I ...
If we want to get a value from a method, we can use either return value, like this:
public int GetValue();
or:
public void GetValue(out int x);
I don't really understand the differences between them, and so, don't know which is better. Can you explain me this?
Thank you.
...