finalization Questions

2

Solved

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 runtim...
Densmore asked 27/9, 2011 at 9:30

1

Solved

(This question is different from Why would you ever implement finalize()? This question is about deprecation from the Java platform, and the other question is about whether one should use this mech...
Gelding asked 14/5, 2019 at 23:8

4

Solved

In Java, overriding the finalize method gets a bad rap, although I don't understand why. Classes like FileInputStream use it to ensure close gets called, in both Java 8 and Java 10. Nevertheless, J...
Aires asked 18/10, 2018 at 17:45

2

Is there a way to obtain the total number of finalizers registered using runtime.SetFinalizer and which have not yet run? We are considering adding a struct with a registered finalizer to some of ...
Adenoidal asked 3/12, 2017 at 14:7

6

In my experience as a C++/Java/Android developer, I have come to learn that finalizers are almost always a bad idea, the only exception being the management of a "native peer" object need...
Broadbill asked 21/5, 2017 at 9:29

1

Solved

I have some code that I suspect is leaking memory. As the code uses ccall and maintains significant information held inside pointers, which are supposed to be free'd by code that is ccalled during ...
Gulf asked 10/6, 2017 at 2:57

1

Solved

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 aft...

1

Solved

I have heard that in Joshua Bloch book written that allocation and memory collection might be increased to 430 times if we override finalize method. It is clear for me that memory collection can w...

1

Solved

I need to optimize my application in memory usage. so I used .net performance profiler... but some references in my application are still alive and are never collected by GC even if I force it to c...
Valorous asked 27/11, 2016 at 11:46

15

Solved

I was having a discussion with a colleague recently about the value of Dispose and types that implement IDisposable. I think there is value in implementing IDisposable for types that should clean u...
Fauman asked 25/4, 2012 at 13:12

1

Solved

Discussions of finalizable objects in Java typically discuss the common indirect costs that happen when finalizable objects (and their associated resources) cannot be quickly garbage collected. I'...
Doily asked 8/5, 2015 at 19:0

6

Solved

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? ...
Apollinaire asked 20/2, 2010 at 6:47

3

Solved

The main question is in the topic but let me show my vision of finalization proccess in Java so that I can ask you a little more. Well the gc starts garbage collection by marking all live objects...
Oxpecker asked 16/2, 2014 at 10:24

3

Solved

In my application I have the following record: TTransaction = record Alias: string Description: string Creation: TDateTime Count: Integer end; and I'm using this record in this array: Trans...
Thinking asked 19/2, 2013 at 13:12

1

Solved

Apparently, Constrained Execution Region guarantees do not apply to iterators (probably because of how they are implemented and all), but is this a bug or by design? [See the example below.] i.e. ...
Solis asked 28/7, 2011 at 16:16

1

Solved

I am trying to find a safe/deterministic way to release an interface which is encapsulated in an OleVariant. AFAICS Delphi releases interface references at the end of a procedure, but in my case I...
Amery asked 19/7, 2011 at 10:33

4

Solved

I need to execute my code after finalization of SysUtils unit. I've placed my code in separate unit and included it first in uses clause of dpr-file, like this: project Project1; uses MyUnit, /...
Gorlovka asked 13/4, 2010 at 10:45

5

Solved

My understanding of finalization is this: To clean up or reclaim the memory that an object occupies, the Garbage collector comes into action. (automatically is invoked?) The garbage collector the...
Nation asked 15/3, 2010 at 21:19

1

Solved

Section 10.13, Destructors, of the C# Language Specification 3.0 states the following: Destructors are not inherited. Thus, a class has no destructors other than the one which may be declared in...
Sassoon asked 8/12, 2009 at 22:52

8

Solved

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 variabl...
Counterproductive asked 25/9, 2008 at 17:18
1

© 2022 - 2024 — McMap. All rights reserved.