garbage-collection

NSTextViews and background layout

Hi, I've got a really weird crash on Leopard (not on Snow Leopard) concerning NSLayoutManager, NSTextView and the background layout feature. My application is 64-bit garbage collected and that seems to be the root of the problem. I've established that the crash happens like this: 1) the system decides to do some background layout on s...

AS3 - when does the garbage collector run ?

apologies if this is a dupe; i couldn't find it. i've read and understood grant skinner's blog on the AS3 garbage collector - http://www.adobe.ca/devnet/flashplayer/articles/garbage_collection.html , but my question isn't covered there. here's my question. suppose i've written some AS3 code like: statementOne; statementTwo; is ther...

Reasons why my Android App would crash on my phone consistently, but not on my emulator

I have an app that uses quite a few graphics in it. When I open and close my app repeatedly on my emulator (1.5 - 2.2) it runs fine and by checking the heap I can see everything is being cleaned and gc'd properly. However, when I run my app on an HTC Aria phone (2.1) the app crashes every time I try to re-open it. When I look at the h...

What does dotTrace Performance Profiler mean by [Garbage collection]?

What does [Garbage collection] mean in this pic? And the "20 calls" thing? I mean, how can I figure out why GC took so long? Was it collecting a lot of small objects? A single big one? Any hints as to how to optimize this at all? The code in question is: private void DeserializeFrom(SerializationInfo info) { Width = info.GetInt3...

Java Garbage Collection - How to find what method was running when it was called

hi al, Assume i'm executing a jvm where garbage collection is not running in parallel. That is when GC executes my main thread is halted. Is there a way in which i can specify what method was running that current moment that the GC was invoked? I know i can get info about time but this is not enough. I assume such profiling info woul...

.NET Garbage Collection (GC) Tuning

Hello, I have situation when GC has not time to delete free objects, how to tune GC or may be are there best practices for tunning GC ? Thanks. code reads big document into memory and processes it, so in one of method presents loop where doing process of this document. If I stopped in this loop(in debug mode) or add GC.Collect() ...

Does array resizing invoke the GC?

Hi, I looked into the implementation of Array.Resize() and noticed that a new array is created and returned. I'm aiming for zero memory allocation during gameplay and so I need to avoid creating any new reference types. Does resizing an array trigger the Garbage Collector on the previous array? I'm creating my own 2D array resizer, but ...

C# static garbage collector?

I have a simple class which has a static constructor and a instance constructor. Now when i initialized the class , both static and instance constructor are called. Only static is referred once in a application domain . Can i again call the same class initialization and static constructor initialize again? I have tried but it didn't happ...

Prevent memory leaks in this javascript code?

I have a Django admin page for a nested category list like this: I wrote this script to sort the list and present it hierarchically: {% extends "admin/change_list.html" %} {% load i18n %} {% block footer %} <script> (function(){ var rows=document.getElementById('result_list').getElementsByTagName('tr'), table=rows[1].parentN...

What is the difference between finalize and dispose in .net ?

Possible Duplicate: Finalize vs Dispose Hi, Recently I was quizzed in an interview about finalize and dispose. When is each one of them used and how is Garbage Collector related to them. Kindly share links to enlighten more on the topic. Kindly share ... Thanks in advance. ...

How to force the filestream garbage collector to complete its work with the highest priority?

After asking this question it is clear to me that I need to be able to perform the garbage collection in the fastest possible time. How is it possible to tell SQL Server filestream's garbage collector to delete all the files with high priority? I tried with the CHECKPOINT statement, even by setting a duration (CHECKPOINT 100), but noth...

Ruby interpreter 1.8.7.0 [i386-mingw32] keeps failing

I have had this problem for a while, but now it is getting so bad that every 2-3 pageloads my local server is failing. activesupport-2.3.5/lib/active_support/core_ext/module/introspection.rb:73: [BUG] gc_sweep(): unknown data type 0x0(0x950f868) ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] This application has requested the ...

Java Garbage Collection Strategy

I'm looking for a technique to find out the Garbage Collection (GC) strategy (collector) the Java VM is using at a given point of time. (Later on, I'd like it to correctly reflect the strategy that I choose, say XX:+UseConcMarkSweepGC.) verbose:gc (in its basic form) does not help as it just shows me what all it did with each generation...

C# Re-Root Reference to Object Using Events before GC Disposes, Ergo Auto-Depency Pattern and Memory/CPU-Efficient Collection

I thought this would be an interesting pattern. A collection of objects is stored in a manager class. When an object is not needed, it is removed from the collection. If it is needed again, and the GC hasn't disposed of it yet, poll for the instance of the existing object with a weak event. For example: class Manager { //--- Events ...

For which kind of applications can the Garbage Collector become a concern?

Because of their efficiency, most of the Garbage Collector algorithm are inoffensive in a lot of applications. The "collection" of objects does however require a small overhead cost in order to scan the stack and to liberate non referenced object from the heap. I know one part of the answer is "it depends". However, I would like to kno...

Which objects are eligible for GC?

class CardBoard { Short story = 200; CardBoard go(CardBoard cb) { cb = null; return cb; } public static void main(String[] args) { CardBoard c1 = new CardBoard(); CardBoard c2 = new CardBoard(); CardBoard c3 = c1.go(c2); System.out.println("c3 value : "+c3); c1 = null; System.out.println("c1 val...

How can I destroy a refreshed DIV that is previously loaded by a plugin in jQuery?

Explanation: I have this in the server side: $objec->write( "divx" ); Then in the user agent (jQuery): <div id="divx"> <!-- SERVER: here will be the content begins --> <script type="text/javascript" language="javascript"> var r = $('#divx').myPluginCreator(); </script> <!-- SERVER: content ends --> </div> Now the plugin has a meth...

Why do the GC times increase steadily on a long running high volume Java app?

I have a high volume Java application that handles a consistent load of 50000msgs/sec. It is tuned for high throughput using the following settings: -Xmx3g -Xms3g -XX:NewSize=2g -Xss128k -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -XX:+UseParallelGC -XX:ParallelGCThreads=12 -XX:+UseParallelOldGC -XX:+HeapDumpOnOutOfMemoryError ...

Is there an event for when garbage collection occurs in .NET?

I've got a weird slowdown in my ASP.NET website that I cannot seem to track down. I'm suspecting that GC might be kicking in and halting my threads. To know for sure it would be nice to log every time when GC does occur. I could make a dummy object and do the logging in its finalizer, but that would then be a one-shot solution, while in...

Threadlocal reference to hibernate session impl, causing session impl not to get garbage collected

Hello, I am using thread local to manage my hibernate sessions. Recently I have been seeing OutOfMemory exceptions on my production server. I ran Eclipse MAT on the heap_dump and saw a lot of my sessions are not getting garbage collected even though they are being closed due to them being referenced by tomcatse ThreadWithAttributes obje...