Finalization is intended for questions regarding programmatically releasing memory in conjuction with garbage collection, external resources and weak references.
I have an application that uses statically-linked runtime packages as well as designtime packages that use them. For some reason the code in any unit finalization section is not being run at runtime (I can't tell when this started…
We are seeing a memory leak with one of our WCF applications and I was wondering if someone could clarify something for me. Using windbg I ran !finalizequeue and it shows thousands of objects in each Heap set as "Ready for finalization".
Heap…
Java allow to write:
new PhantomReference(new Object(), null)
At this case new Object() will be collected?
As I understand, phantom reference is alternative of finalize() method usage.
And after appearing reference in queue, I need to do some…
I have two units unitA and unitB.
Class TFoo is declared in unitB.
Is it allways safe to call B.Free in finalization of unitA?
How does it depend on in which order unitA and unitB are in dpr?
Can I be sure that unitB exists when unitA finalization…
Summary: C#/.NET is supposed to be garbage collected. C# has a destructor, used to clean resources. What happen when an object A is garbage collected the same line I try to clone one of its variable members? Apparently, on multiprocessors,…
I have crash in my program, it is a visualizer for VS, so, it is very hard to debug it, i have tried to make dump and use WinDbg to study it, but it unsuccessful.
So, now i try to put my hands on that list programmatically, but i don't know how.…
I have a multithreaded application with many forms, but I have to instantiate some classes and call some initialization stuff before the creation of the forms.
Of course I have to execute the corresponding finalization code.
Here is a simplified…
I recieve SQLITE_CORRUPT error for the database being corrupt.
wrong # of entries in index sqlite_autoindex_Settings_1
In my code I have a try/finally clause in which I always try to always sqlite3_finalize my statements.
Apparently on a corrupted…
Why is my finalizer not being called?
using System;
class Program
{
static void Main(string[] args)
{
Test test = new Test();
}
}
class Test
{
public Test()
{
Console.WriteLine("Start");
}
~Test()
…
In order to understand weak references in Java, I have had to consult the Java Language Specification. The following part, from section 12.6, puzzles me:
An unfinalized object has never had its finalizer automatically invoked;
a finalized…
Question
I have a URLClassLoader anonymous class. In it, I've overridden the finalize() method so that the object will automatically close itself when garbage collected:
protected void finalize() throws Throwable {
close();
}
and I've…
I am porting Lightweight Communications and Marshalling from julia to lisp as it has a better API. I used swig to generate C function calls.
I want to know if this is a safe usage for C pointer or not. here is the create function:
(defun create-lcm…
If I have an allocatable array of a finalizable derived type, will the finalizer be called on every individual element when the array goes out of scope?
Here is a small code example that illustrates the question:
module LeakyTypeModule
implicit…
I'm a beginner to delphi and I'm stuck with a finalization error e2155. I'm using RAD 10 and try to run my programm on mobile devices. It works fine on my windows machine, but when i change to Android or IOS it gives me that finalization error.
The…
I get the gist of reference objects in Java, and the basic differences between soft, weak, and phantom reference objects.
However, I don't fully understand the following points from the API docs
From the API doc for WeakReference:
"Weak…