Questions tagged [garbage]

Garbage, refers to objects, data, or other regions of the memory of a computer system (or other system resources), which will not be used in any future computation by the system, or by a program running on it.

From a programming point-of-view, garbage is data that has been placed in random access memory space obtained from the operating system that is no longer needed. Freeing the space for reuse is called "garbage collecting".

448 questions
0
votes
0 answers

javascript garbage in properties for inherited instances in Jasmine

I have a problem that when testing my classes using Jasmine, some properties of an inherited class get garbage initial values despite the fact I initialize them in the parent class. To be precise: I have a "class" function Attributes(attr) { …
Andrew
  • 2,148
  • 5
  • 23
  • 34
0
votes
2 answers

Android: garbage collector not working for Bitmap

I have a ViewPager with a couple of fragments. In a fragment onCreateView, I decode a couple of bitmaps that are assigned to fields in the Fragment class. If I try to swipe between the fragments, at a certain point the application gets an…
0
votes
1 answer

Python: Memory Leak

I'm using Python to display a bitmap image on a LCD display (Raspberry Pi). This works quite well but it seems that I've created myself a huge memory leak. This piece of code seems to be the culprit: def displayBitmap(self): spi.open(0,0) f…
tungl
  • 31
  • 1
  • 5
0
votes
2 answers

How often is garbage collected in Java?

How often is garbage collected in Java (on a regular PC and on an Android phone)? I tried looking it up, but did not get a number. I know it probably depends on a lot of factors, but I just want a rough idea.
Shivanshu Goyal
  • 1,374
  • 2
  • 16
  • 22
0
votes
2 answers

C++, recursive correct answer but not being returned correctly

Ok, so heres my simple program for calculating Greatest common divisor. It is returning a garbage value everytime the same as 46332964. Ive thought over my head for an hour but cant seem to understand the problem. After research, i also included the…
Shoaib
  • 188
  • 2
  • 11
0
votes
3 answers

Random zero in Binary Tree

I'm running into an issue with a simple binary tree manipulation program. There's a zero being entered somewhere in the code, and I simply can't figure out how to get rid of it. Here's the main function in the program:…
alldavidsluck
  • 77
  • 2
  • 3
  • 10
0
votes
2 answers

Is leaked memory and all the memory resources being freed once application termintates?

Once android application terminates (closed either by user or by OS), is leaked memory and all other memory resources being freed? Or we need to do it manually? What will be the best way to track and handle memory issues in android?
Daud Arfin
  • 2,499
  • 1
  • 18
  • 37
0
votes
1 answer

Getting garbage printed

I am trying the following simple CUDA C code but getting garbage value printed: #include __global__ void hellocuda(int* tidx){ *tidx = 100; } int main(){ int* d_tidx; int* c; cudaMalloc((void**) &d_tidx, 1); c =…
Ketan Maheshwari
  • 2,002
  • 3
  • 25
  • 31
0
votes
2 answers

Stack & Heap & Garbage Collector

The title might be a bit incorrect however its about Stack & Heap and Garbage Collector none the less. My Code: static void Main(string[] args) { MyInt x = new MyInt(); x.MyValue = 3; MyInt y = new MyInt(); y…
Ailayna Entarria
  • 303
  • 3
  • 16
0
votes
2 answers

Getting Garbage Values while reading struct data from a binary file

Hi guys in my previous question, I was able to get the data of a struct to be loaded on a file, but now the issue is I'm getting garbage value while retrieving it. File Contents: settings.bin 110#NormalCompression Level210#NormalCompression…
Darius967
  • 13
  • 3
0
votes
2 answers

Why does this give junk value?

I am getting garbage / junk values as output when my program is run and the data displayed. Why is it so? Can someone help me to understand how to properly pass by pointers and not get junk values? This program is about stack creation of struct…
user2734982
0
votes
2 answers

Extra Characters printed in the file

I have made a program to encrypt and decrypt a message using a vigenere cipher. While encrypting or decrypting the text, some extra garbage values are printed in it. It takes the input from a file named input.txt and outputs to output.txt, you have…
0
votes
0 answers

Why's my vector element all garbage?

I have a GameLobby class that keeps a list of the currently active games. I want to fetch the active games from a GameLobby (singleton) object, and display these to the user. (Disclaimer: I'm pretty new to C++, so the following code isn't exactly…
conciliator
  • 6,078
  • 6
  • 41
  • 66
0
votes
3 answers

Garbage value with getline

#include #include void main() { clrscr(); char c[50]; //cin>>c; cin.getline(c,50); //cout.write(c,50); cout<
0
votes
1 answer

jQuery - Memory leak/garbage collection with .remove()/.after()

After leaving my browser window open all weekend, I came in this morning to the office with a hosed IE. I'm doing a 'stats' dashboard bar that updates every 30 seconds. The return is an html string, as a full xcontents I'm appending this to the…
BReal14
  • 1,603
  • 1
  • 12
  • 35