Hi,
I have written an app using dojo that allocates a lot of data during its lifetime. Is there a way I can ensure that all the memory has been released when I am done?
Is there a method like dojo.data.destroyAllStores() that I can use with the <body onunload> tag?
Thanks.
...
Is it better to Unload a MovieClip before Removing it off the Stage, in order for its contents to get cleared from RAM and therefore free up RAM better?
Adobe Flash AS2 Documentation:
removeMovieClip() - Removes a movie clip instance.
unloadMovie() - Removes the contents of a movie clip instance.
...
Given the code:
new Thread(new BackgroundWorker()).start();
Intuitively it feels like the BackgroundWorker instance should be safe from GC until the thread exits, but is this the case ? And why ?
Edit:
All this heat is basically generated by me asking at least two different questions in the same post. The question in the title has...
I remembered someone telling me one good one. But i cannot remember it. I spent the last 20mins with google trying to learn more.
What are examples of bad/not great code that causes a performance hit due to garbage collection ?
...
Hey all,
Can someone please explain me how garbage collection is working?
(I'm using C# and Java).
...
Is there a way in the .NET API to iterate on the managed objects present in the managed heap?
We would like to add a routine at some points in our program which checks the presence of some objects in the managed heap.
...
I am writing an Objective-C program that utilizes the garbage collector.
I am getting *EXC_BAD_ACCESS* in some situations, the classic example of an object being "over freed". Using some of the debugging tips in this technote, namely MallocScribble and *AUTO_LOG_COLLECTIONS*, I can see that my object is being GC'd out from under me.
Wi...
Since a finalizer being called usually indicates a missing Dispose() call, I would like determine what finalizers are being called.
...
In C# code, I have three objects A, B and C. A and B each hold a reference to C. When A is destroyed I would like the reference from B to C to be deleted as well so that C can be destroyed by the Garbage Collector.
Is there a way to do this without deleting it manually from B? (The destructor in C is not called before the reference fro...
Hi There
Does anyone know the major differences between the Java and C# garbage collectors? A web search has not revealed much, and it was a question that came up in a test.
Thanks,
Mike
...
Is the memory from primitive data types (int, char,etc) immediately released once they leave scope, or added to garbage collection for later release?
consider:
For x as integer=0 to 1000
dim y as integer
Next
If this doesn't add 1000 integers to the garbage collector for clean up later,
how does it treat string objects? would this cr...
I've implemented a newer GC algorithm and thought my findings could help.
What should I do? Publish a blog? Do my best to write a paper and/or just start submitting abstracts to journals? I don't have any academic credentials myself.
Should I start emailing local Professors to see if they could help me write it? Email professors w...
Say I have a method like this (stolen from a previous SO answer by Jon Skeet):
public static IEnumerable<TSource> DuplicatesBy<TSource, TKey>
(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
{
HashSet<TKey> seenKeys = new HashSet<TKey>();
foreach (TSource element in source)
{
// Yield it if the...
In ASP.NET if items are left in the session state that Implement IDisposable but are never specifically removed and disposed by the application when the session expires will Dispose be called on the objects that any code in Dipose() will execute?
...
I'm using garbage collection in Objective-C 2.0. Do I need to retain properties? Eg.
@property (nonatomic, retain) NSMutableArray *myArray;
Or is this enough:
@property (nonatomic) NSMutableArray *myArray;
I initialize the array like this:
self.myArray = [NSMutableArray array];
...
The question says it all,
I have some code like, this code is used very heavily:
using (HttpWebResponse response = _GetHttpWebResponse(requestURIString, msgBody, methodType, contentType, headers)) {
//*** do something with it...
//*** Call response.Close() ???
}
The code works fine today, but the connections to the serv...
I have a class that offers up a few events. That class is declared globally but not instanced upon that global declaration--it's instanced on an as-needed basis in the methods that need it.
Each time that class is needed in a method, it is instanced and event handlers are registered. Is it necessary to remove the event handlers explici...
I want to install a GC Patched Ruby to do a memory profiling on my app. I followed the instructions at http://guides.rubyonrails.org/performance_testing.html#gc and installed a ruby instance at my home dir (I already have another "official" instance for development). This GC Patched ruby instance is working fine.
The problem is when I n...
I have a number of large (~100 Mb) files which I'm regularly processing. While I'm trying to delete unneeded data structures during processing, memory consumption is a bit too high. so, I was wondering is there a way to 'efficiently' manipulate large data, e.g.:
def read(self, filename):
fc = read_100_mb_file(filename)
self.proc...
I have some C++/CLI code that needs to pin a struct (value type) in order to pass it back to unmanaged code. The unmanaged code knows enough to unmarshal what it needs.
The struct may contain managed strings and so I also need to pin these before calling the unmanaged function.
The problem is that my managed helper class is generic:
...