garbage

Qt: Is is possible to get the QScriptEngine from QWebFrame?

I need to get access to the javascript QScriptEngine in a QWebFrame. Is that possible? Well, at least I think I need access to it. In response to a javascript call I need to allocate a new object, return it to javascript and hand ownership of the object to javascript so that it can be garbage collected. It looks like QScriptEngine::n...

Seeing Garbage When Using Bison

Hello, I'm trying to use Bison to compile(i don't know if this is the correct word to use), but when i try to compile this source code: %{ #define YYSTYPE double #include <math.h> #include <stdio.h> %} %token NUM %% input: /* empty */ | input line ; line: '\n' | exp '\n' { printf ("\t%.10g\n", $1); } ; exp: ...

php regular expression to filter out junk

So I have an interesting problem: I have a string, and for the most part i know what to expect: http://www.someurl.com/st=???????? Except in this case, the ?'s are either upper case letters or numbers. The problem is, the string has garbage mixed in: the string is broken up into 5 or 6 pieces, and in between there's lots of junk: unpri...

Does lock allocate

I read somewhere, although I can't remember where, that using the lock keyword in C# can allocate. I know that trying to lock a ValueType will box the valuetype, but are there any other situations? EDIT:: Everyone seems to be answer the valuetype case, I already know this! I also know what locks are and how to use them in great depth...

Utilities to find Gen1, Gen 2 objects promoted in BizTalk Orchestration?

Hi I am trying to profile a memory guzzling biztalk orchestration. This orchestration is using plenty of maps with a few custom script functoids. I wish to identify the lifetime of the custom objects created by orchestration and how are they promoted in the Garbagage collection. Am not able to use the CLR profiler for the same. Looki...

Lost references in Lua

Having a problem with objects, not needed any more but still having references. Result: size of allocated memory is constantly growing due to not collected objects. How to solve this sort of problem? Is there any way to find objects with only one reference, or objects with lifetime more than some value? Or any another solution? Using L...

Different outputs after debugging and compiling C++ programs

I'm running CodeBlocks on the MingW compiler in an XP virtual machine. I wrote in some simple code, accessible at cl1p , which answers the algorithm question at CodeChef (Well it only answers it partly, as I have not yet included the loop for multiple test cases. However, my problem is, that while running it in debug mode, it gives the ...

std::map inizialitazion (only one time)

I have a function that translates data using std::map struct HistoParameter { int nbins; float first; float last; HistoParameter(int _nbins, int _first, int _last) : nbins(_nbins), first(_first), last(_last) {}; }; HistoParameter* variable_to_parameter(char* var_name) { std::map<const std::string, HistoParameter*> hp; h...

Getting a value by reflection without garbage

I am writing a system which requires me to fetch the values of properties in an object, preferably using reflection. This project is for the xbox360, which runs on the compact framework and thus has a slow garbage collector - this means it's absolutely vital that I avoid allocations! The only way I have found to do this is: Foo Somethi...

how to get rid off garbage in array of chars?

hi, I'm writing a C program but I keep having problems with my array of chars. I keep getting garbage when I print it using prinf. here is an example of what I get when I print it: char at t.symbol is Aôÿ¿ char at tabl[0].symbol is A char at tabl[1].symbol is a char at tabl[2].symbol is a char at tabl[3].symbol is d char at tabl[4]...

QPainter paints garbage

Fragment of program code: def add_link(Item0Num, Item1Num): global Mw, View # Mw - MainWindow if Item0Num != Item1Num and not link_exists(Item0Num, Item1Num): append( links_to(Item1Num), Item0Num ) append( links_from(Item0Num), Item1Num ) LinkGi = TLinkGi() Mw.Scene.addItem(LinkGi) LinkGi....

strange garbage data when opening a previously truncated file

In my program, I've redirected stdout to print to a file 'console.txt'. A function writes to that file like this: void printToConsole(const std::string& text, const TCODColor& fc, const TCODColor& bc) { // write the string cout << text << "@"; // write the two color values cout << static_cast<int>(f...

iPhone doubt after analyzing the project

Hi all! I have some memory problems, from another post I tried to analyze my project to understand my errors.... here are some things that I don't understand where's my error.... thanks 1: sqlite connection: 2: json converter: 3: url connection: 4: cell of uitableview: ...

solving default garbage values in c

If we declare a variable in c programming as integer without defining value then printf prints some garbage value from buffer. Is there any method to prevent printing the garbage value? I want to check if something can be done at compile time? if possible? ...

Why does running out of memory depend on intermediate calls to GC.GetTotalMemory?

A memory intensive program that I wrote ran out of memory: threw an OutOfMemory exception. During attempts to reduce memory usage, I started calling GC.GetTotalMemory(true) (to write the total memory usage to debug file), which triggers a garbage collect. For some reason, when calling this function I don't get an out of memory exceptio...

How do you Force Garbage Collection from the Shell?

So I am looking at a heap with jmap on a remote box and I want to force garbage collection on it. How do you do this without popping into jvisualvm or jconsole and friends? I know you shouldn't be in the practice of forcing garbage collection -- you should just figure out why the heap is big/growing. I also realize the System.GC() does...

Garbage collection eats status item

Hello I turned on garbage collection (objective-c 2.0) and the image for the status item disappeared when I restarted my application.  I am manually memory managing the image and status item.  This application works normal when garbage collection is off.  Is there a way to make the garbage collection not collect specific variables or sho...

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

Mechanism of the Boehm Weiser Garbage Collector

I was reading the paper "Garbage Collector in an Uncooperative Environment" and wondering how hard it would be to implement it. The paper describes a need to collect all addresses from the processor (in addition to the stack). The stack part seems intuitive. Is there any way to collect addresses from the registers other than enumeratin...

PHP generated Excel file is different when downloaded

I have a PHP file that generates xls files using the module found at http://pear.php.net/package/Spreadsheet_Excel_Writer/ I can create the sample document just fine and when I open it, it looks fine. My next step it to turn it into a downloadable link. To do that, I did this: $mimeType = "application/vnd.ms-excel"; $file_name...