Search Results

Search found 1138 results on 46 pages for 'venerable garbage collector'.

Page 24/46 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • C# memory management: unsafe keyword and pointers

    - by Alerty
    What are the consequences (positive/negative) of using the unsafe keyword in C# to use pointers? For example, what becomes of garbage collection, what are the performance gains/losses, what are the performance gains/losses compared to other languages manual memory management, what are the dangers, in which situation is it really justifiable to make use of this language feature... ?

    Read the article

  • changing vim's vertsplit character to ¦

    - by ldigas
    This is, I assume, codepage related, but doesn't hurt asking. How would one, on windows xp's cmd, gvim 7.2 change vertsplit character, so that instead of default | it is ¦ (so that it makes a full, and not an splitted line) ? That character is usually changed with set fillchars=vert:\| and I can copy paste the ascii graphics line there, but it comes out as garbage. I suppose I would have to change vim's internal codepage for it to show correctly ? Anyone knows how to do this ?

    Read the article

  • Possible to repair garbled Chinese filenames?

    - by futureelite7
    I'm downloading via FTP some files with chinese names (BIG5 encoded), and Filezilla displays those filenames as garbage (as FTP cannot handle any encoding other than ASCII and UTF-8, as least the standard compliant ones). Given a filename with garbled characters, is it possible for me to repair the encoding and get a proper filename String given that I already know the source encoding? Will the FTP client misinterpreting BIG5 as UTF-8 insert bytes that make conversion back to BIG5 difficult?

    Read the article

  • Using regexkitlite with strings containing % signs

    - by David Liu
    So I'm using RegexKitLite in my iPhone app, and I'm basically grabbing out a bunch of URLs and names from within a web page. The problem is that whenever it comes across a URL with URL encoded characters like %22 for a double quote or %27 for a single quote, the captured string basically gives me a jumbled overflowed string, containing garbage and even method names. I'm really not doing anything particularly special within the regex, just your basic "startdelimiter(.*)enddelimiter" regex.

    Read the article

  • Should I worry about circular references in Python?

    - by bodacydo
    Suppose I have code that maintains parent/children structure. In such a structure I get circular references, where child points to parent and parent points to child. Should I worry about them? I'm using Python 2.5. I am concerned that they will not be garbage collected and the application will eventually consume all memory. Thanks, Boda Cydo.

    Read the article

  • Calling via adb in Power shell

    - by Imran Nasir
    As you may know, the command for calling via adb is: .\adb.exe shell am start -a android.intent.action.CALL tel:"656565" This works well but when I use textbox, it takes garbage value... .\adb.exe shell am start -a android.intent.action.CALL tel:$textbox1.Text I have tried this also but failed $button21_Click={ #TODO: Place custom script here $textbox1.Clear .\adb.exe shell am start -a android.intent.action.CALL tel:$textbox1.Text } Please help

    Read the article

  • object array mobile development

    - by mixm
    Im currently creating a tile-based game for android. Using java via dalvik JVM. im fretting over a decision to represent objects in a particular map. should i use an id based map (2 dimensional integer array) and place game logic in a separate function in the game engine, or create an object array (2 dimensional array of game objects) and store game logic within the class methods. i am thinking about the cost of object creation and garbage collection vs extensibility.

    Read the article

  • pdflatex document to html

    - by Mica
    I need to convert a bunch of pdflatex only documents (because of graphics-- .pdf's jpgs & pngs) to html. tex4ht is giving a bunch of garbage output. the documents are built using the \input command. Is there anything I can do to help tex4ht with a pdflatex document? I've looked at many converters (pandoc, hevea, tth, latex2rtf) but none of them can include my figures well. Is tex4ht my best bet?

    Read the article

  • Programming Constructs History

    - by kunjaan
    I need some help in figuring out which language introduced the constructs that we use everyday. For example: Constructs Introduced from LISP If-Else Block :"The ubiquitous if-then-else structure, now taken for granted as an essential element of any programming language, was invented by McCarthy for use in Lisp, where it saw its first appearance in a more general form (the cond structure). It was inherited by Algol, which popularized it. " - WikiPedia Function Type : Functions as first class citizens. Garbage Collection

    Read the article

  • function parameter used to store value

    - by user248247
    Hi, I have to define an interface. The API in my homework is stated below: int generate_codes(char * ssn, char * student_id); int denotes 0 or 1 for pass or fail. studentid is an output param should return a 6 digit id. ssn is a 9 digit input param they school program will take ssn's and use my code to generate the student id. now from an API perspective should I not be using const char * for both parameters. should the studentid not be passed in by reference? rather than by pointer? can someone tell me how i can easily use the pointer in my test app which uses my api to get the pointer such that it prints a std::string from a char *? my app code looks something like const char * ssn = "987098765" const char * studnt_id = new char [7]; int value = -1; value = generate_codes(ssn,studnt_id); std::string test(studnt_id); std::cout<<"student id= "<<test<<" Pass/fail= "<<value<<std::endl; delete [] studnt_id; return 0; I basically got an error about << not being compatible with the right hand side of the operand. When i changed the code to std::cout<<"student id= "<<test.c_str()<<" Pass/fail= "<<value<<std::endl; then it worked but i get garbage for the value. not sure how to do get the value form the pointer. THe value inside the function prints just fine. but when i try to print it outside of the function it prints garbage. Inside the above function I do set the studndt_id like so std::string str_studnt_id = studnt_id; should that make the address of the str_studnt point to the address of studnt_id and thus any changes I make to the value that its pointing to it should reflect outside the function?

    Read the article

  • Tool for debugging KVO/Bindings in Cocoa

    - by Raphael Sebbe
    Is there any tool to log current observers of a given object, in the spirit of what "gdb info gc-roots" does? I found "gdb info gc-references" could do that (sort of) as a by-product of its original purpose, but that won't work with non garbage collected apps. Thanks!

    Read the article

  • How to provide js-ctypes in a spidermonkey embedding?

    - by Triston J. Taylor
    Summary I have looked over the code the SpiderMonkey 'shell' application uses to create the ctypes JavaScript object, but I'm a less-than novice C programmer. Due to the varying levels of insanity emitted by modern build systems, I can't seem to track down the code or command that actually links a program with the desired functionality. method.madness This js-ctypes implementation by The Mozilla Devs is an awesome addition. Since its conception, scripting has been primarily used to exert control over more rigorous and robust applications. The advent of js-ctypes to the SpiderMonkey project, enables JavaScript to stand up and be counted as a full fledged object oriented rapid application development language flying high above 'the bar' set by various venerable application development languages such as Microsoft's VB6. Shall we begin? I built SpiderMonkey with this config: ./configure --enable-ctypes --with-system-nspr followed by successful execution of: make && make install The js shell works fine and a global ctypes javascript object was verified operational in that shell. Working with code taken from the first source listing at How to embed the JavaScript Engine -MDN, I made an attempt to instantiate the JavaScript ctypes object by inserting the following code at line 66: /* Populate the global object with the ctypes object. */ if (!JS_InitCTypesClass(cx, global)) return NULL; /* I compiled with: g++ $(./js-config --cflags --libs) hello.cpp -o hello It compiles with a few warnings: hello.cpp: In function ‘int main(int, const char**)’: hello.cpp:69:16: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null] hello.cpp:80:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] hello.cpp:89:17: warning: NULL used in arithmetic [-Wpointer-arith] But when you run the application: ./hello: symbol lookup error: ./hello: undefined symbol: JS_InitCTypesClass Moreover JS_InitCTypesClass is declared extern in 'dist/include/jsapi.h', but the function resides in 'ctypes/CTypes.cpp' which includes its own header 'CTypes.h' and is compiled at some point by some command during 'make' to yeild './CTypes.o'. As I stated earlier, I am less than a novice with the C code, and I really have no idea what to do here. Please give or give direction to a generic example of making the js-ctypes object functional in an embedding.

    Read the article

  • disposing a class loader

    - by java_geek
    I am using a custom class loader which extends URLClassLoader. I load some classes into my custom class loader and perform some task. Once the task is completed i want to dispose of the class loader. I tried doing that by setting the reference to null. But this does not garbage collect the class loader. Is there a way that can help what i want to achieve?

    Read the article

  • Cannot evaluate expression error in ONE project for years

    - by pukipuki
    Just tired to see this error every time for years only in ONE project: "Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized" Almost every property or field displays this message. From vs2005+.net2.0 to vs2008+.net3.5 now. Does anybody know how to fix it?

    Read the article

  • Is it possible to profile memory usage of unit tests?

    - by Rowland Shaw
    I'm looking at building some unit tests to ascertain if resources are leaking (or not) using the unit testing framework that comes with Visual Studio. At present, I'm evaluating the latest version of ANTS Profiler, but I can't quite work out if it allows me to force a snapshot from code (so that I can take a snapshot, run a unit test a few hundred times, force a garbage collection, and take another snapshot, and save the results out for later analysis). Is this possible to do with ANTS/Visual Studio or should I be exploring options with other profilers?

    Read the article

  • Oracle PL/SQL Import Japanese values CSV file

    - by cedric
    Hi. I am having problem with importing csv files containing values in japanese characters. When I do so it will display garbage when I query. my OS is japanese. My encoding for oracle NLS_LANG is JAPANESE_JAPAN.JA16SJISTILDE. I don't know what the problem is. When I try to import the very same file in some of my office mates' PC it just works fine

    Read the article

  • Referencing global variables in local scopes

    - by Jineesh
    Hello, I would like to know memory leak in the below mentioned code. Does JavaScript do automatic garbage collection. var aGlobalObject = SomeGlobalObject; function myFunction() { var localVar = aGlobalObject; } Do I have to clear the memory as given below. var aGlobalObject = SomeGlobalObject; function myFunction() { var localVar = aGlobalObject; localVar = null;// or delete localVar } Thanks

    Read the article

  • Few doubts regarding Bitmaps , Images & `using` blocks

    - by imageWorker
    I caught up in this problem. http://stackoverflow.com/questions/2559826/garbage-collector-not-doing-its-job-memory-consumption-1-5gb-outofmemory-exc I feel that there is something wrong in my understanding. Please clarify these things. Destructor & IDisposable.Dispose are two methods for freeing resources that are not not under the control of .NET. Which means, everything except memory. right? using blocks are just better way of calling IDisposable.Dispose() method of an object. This is the main code I'm referring to. class someclass { static someMethod(Bitmap img) { Bitmap bmp = new Bitmap(img); //statement1 // some code here and return } } here is class I'm using for testing: class someotherClass { public static voide Main() { foreach (string imagePath in imagePathsArray) { using (Bitmap img1 = new Bitmap(imagePath)) { someclass.someMethod(img1); // does some more processing on `img1` } } } } Is there any memory leak with statement1? Question1: If each image size is say 10MB. Then does this bmp object occupy atleast 10MB? What I mean is, will it make completely new copy of entire image? or just refer to it? Question2:should I or should I not put the statement1 in using block? My Argument: We should not. Because using is not for freeing memory but for freeing the resources (file handle in this case). If I use it in using block. It closes file handle here encapsulated by this bmp object. It means we are also closing filehandle for the caller's img1 object. Which is not correct? As of the memory leak. No there is no scope of memory leak here. Because reference bmp is destroyed when this method is returned. Which leaves memory it refered without any pointer. So, its garbage collected. Am I right? Edit: class someclass { static Bitmap someMethod(Bitmap img) { Bitmap bmp = new Bitmap(img); //can I use `using` block on this enclosing `return bmp`; ??? // do some processing on bmp here return bmp; } }

    Read the article

  • MonoTouch Hello World for iPad

    - by Bryan
    I have tried following the sample Hello World for MonoTouch by creating an iPad solution. For some reason I cannot get the MainWindow to load. I followed the instructions exactly and the app just closes before even loading a view. Is there something missing? Do I need to tell the solution how to load the MainWindow.XIB or something? Please help, this seems very basic and I am about to throw MonoTouch in the garbage.

    Read the article

  • Instance caching in Objective C

    - by zoul
    Hello! I want to cache the instances of a certain class. The class keeps a dictionary of all its instances and when somebody requests a new instance, the class tries to satisfy the request from the cache first. There is a small problem with memory management though: The dictionary cache retains the inserted objects, so that they never get deallocated. I do want them to get deallocated, so that I had to overload the release method and when the retain count drops to one, I can remove the instance from cache and let it get deallocated. This works, but I am not comfortable mucking around the release method and find the solution overly complicated. I thought I could use some hashing class that does not retain the objects it stores. Is there such? The idea is that when the last user of a certain instance releases it, the instance would automatically disappear from the cache. NSHashTable seems to be what I am looking for, but the documentation talks about “supporting weak relationships in a garbage-collected environment.” Does it also work without garbage collection? Clarification: I cannot afford to keep the instances in memory unless somebody really needs them, that is why I want to purge the instance from the cache when the last “real” user releases it. Better solution: This was on the iPhone, I wanted to cache some textures and on the other hand I wanted to free them from memory as soon as the last real holder released them. The easier way to code this is through another class (let’s call it TextureManager). This class manages the texture instances and caches them, so that subsequent calls for texture with the same name are served from the cache. There is no need to purge the cache immediately as the last user releases the texture. We can simply keep the texture cached in memory and when the device gets short on memory, we receive the low memory warning and can purge the cache. This is a better solution, because the caching stuff does not pollute the Texture class, we do not have to mess with release and there is even a higher chance for cache hits. The TextureManager can be abstracted into a ResourceManager, so that it can cache other data, not only textures.

    Read the article

  • serialport or USB port?

    - by I__
    i am using this code:: http://stackoverflow.com/questions/3033324/c-serialport-question/3033402#3033402 to check what port my USB phone is connected to. supposedly USB would be a virtual com, but this seems to be incorrect i used the above code to detect where my phone is and the output is just garbage. is there a way for me to get c# to speak to my usb port so that i can speak to the gsm phone connected to it?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >