Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
2 answers
212 views

I have an old test in code which uses EasyMock instead of Mockito. When I run test locally then it works, however when it runs in gitlab pipeline then I get: junit.framework.AssertionFailedError: ...
Michu93's user avatar
  • 5,877
0 votes
1 answer
79 views

Here is the code block public class Person { int age; String name; // @Override public void finalize() throws Throwable{ System.out.println("Garbage collected --->...
Leong's user avatar
  • 45
0 votes
0 answers
62 views

I am trying to write a program that moves an elevator randomly through the floors of different buildings with different stories. I need to use the finalize() method to clean up after every building. ...
-2 votes
1 answer
277 views

I have extensive Java experience and know why finalize() is scheduled for a removal soon. On the other hand, my knowledge about C# is skin-deep - I am more or less aware about what features it offers ...
Turin's user avatar
  • 2,311
0 votes
0 answers
158 views

I have memory-expensive objects, that sometimes come with identical content. I would like to cache them as long as they're referenced at least once, and evict from the cache if all referenced are ...
Zyx's user avatar
  • 336
1 vote
2 answers
3k views

Is there any difference between A and B? Are there any cases where one would behave differently than the other? A) observableHere .pipe( finalize(() => { // Do stuff here ...
JWess's user avatar
  • 648
0 votes
1 answer
134 views

I'm using Java 8 on windows 10 and I have this code snippet to test how System.gc() works: public class testGc{ static class MyObject{ @Override protected void finalize() throws ...
0 votes
0 answers
950 views

When analyzing a heap dump of my application I noticed 1478 instances of java.lang.red.Finalizer class. 501 of them was referencing org.postgresql.jdbc.PgConnection class and another 501 sun.security....
4 votes
2 answers
3k views

In my Angular service, I've got a loading prop which I set true as a first thing done in the method fetching data. I want to set loading to false after the data is downloaded. I was doing it in ...
0 votes
0 answers
508 views

I have a Fortran 90 code which uses the MPI library. At the end of the code, I have the following statements to finish the program: call MPI_Finalize(ierr) write(6,*) ierr stop The code to ...
1 vote
0 answers
849 views

from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import padding import os ...
0 votes
3 answers
721 views

I have the following Java code I wanted to convert into Kotlin: @Override protected void finalize() throws Throwable { try { release(); } finally { super.finalize(); } } ...
1 vote
0 answers
259 views

I have a container type that has an allocatable array of another type. When the final procedure is called on the container type and the allocatable array is deallocated, it doesn't trigger the final ...
-1 votes
1 answer
170 views

Below is a typical IDisposable implementation for C# class which has managed and unmanaged resources both. My question is, Can there be a situation where ~DisposableObject() destructor method gets ...
anands's user avatar
  • 28
0 votes
0 answers
216 views

I had a scenario where I need to perform database connectivity using Java11 twice using Windows Authentication on SQL server. Initially, the sqljdbc_auth.dll is loaded for the first call and the ...

15 30 50 per page
1
2 3 4 5
...
16

AltStyle によって変換されたページ (->オリジナル) /