Search Results

Search found 1117 results on 45 pages for 'garbage collector'.

Page 31/45 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Outlook is unable to accept french-accented characters in my mailto string?

    - by 4501
    Outlook is causing some problems when being passed a mailto string with accented characters in it. Changing the codepage for my entire webpage that has this string on it solves this problem, but that causes other problems in the system, so I would not like to do that. A string like such returns a lot of garbage characters: "mailto:[email protected]?subject=Mon bâtiment / Départementé / Bureau n'est pas répertorié" Meanwhile, this cuts off the character after the "D" "mailto:[email protected]?subject=Mon bâtiment / D&eacute;partement&#233; / Bureau n'est pas r&#233;pertori&#233;" What gives? Is there no way to make this work? I am in Canada, so some regional issues might be taking effect here?

    Read the article

  • Why is memory management so visible in Java VM?

    - by Emil
    I'm playing around with writing some simple Spring-based web apps and deploying them to Tomcat. Almost immediately, I run into the need to customize the Tomcat's JVM settings with -XX:MaxPermSize (and -Xmx and -Xms); without this, the server easily runs out of PermGen space. Why is this such an issue for Java VMs compared to other garbage collected languages? Comparing counts of "tune X memory usage" for X in Java, Ruby, Perl and Python, shows that Java has easily an order of magnitude more hits in Google than the other languages combined. I'd also be interested in references to technical papers/blog-posts/etc explaining design choices behind JVM GC implementations, across different JVMs or compared to other interpreted language VMs (e.g. comparing Sun or IBM JVM to Parrot). Are there technical reasons why JVM users still have to deal with non-auto-tuning heap/permgen sizes?

    Read the article

  • java looping - declaration of a Class outside / inside the loop

    - by lisak
    when looping, for instance: for ( int j = 0; j < 1000; j++) {}; and I need to instantiate 1000 objects, how does it differ when I declare the object inside the loop from declaring it outside the loop ?? for ( int j = 0; j < 1000; j++) {Object obj; obj =} vs Object obj; for ( int j = 0; j < 1000; j++) {obj =} It's obvious that the object is accessible either only from the loop scope or from the scope that is surrounding it. But I don't understand the performance question, garbage collection etc. What is the best practice ? Thank you

    Read the article

  • So does Apple recommend to not use predicates and sort descriptors in an NSFetchRequest?

    - by dontWatchMyProfile
    From the docs: To summarize, though, if you execute a fetch directly, you should typically not add Objective-C-based predicates or sort descriptors to the fetch request. Instead you should apply these to the results of the fetch. If you use an array controller, you may need to subclass NSArrayController so you can have it not pass the sort descriptors to the persistent store and instead do the sorting after your data has been fetched. I don't get it. What's wrong with using them on fetch requests? Isn't it stupid to get back a whole big bunch of managed objects just to pick out a 1% of them in memory, leaving 99% garbage floating around? Isn't it much better to only fetch from the persistent store what you really need, in the order you need it? Probably I did get that wrong...

    Read the article

  • XmlDocument caching memory usage

    - by mdsharpe
    We are seeing very high memory usage in .NET web applications which use XmlDocument. A small (~5MB) XML document is loaded into an XmlDocument object and stored in HttpContext.Cache for easy querying and XSLT transformation on each page load. The XML is modified on disk periodically so a cache has a dependency on the file. Such an application appears to be using hundreds of megabytes of RAM. I have experimented with requesting garbage collection on each request start, and this keeps the RAM usage far lower but I cannot imagine this is good practise. Does anyone have any suggestions as to how we can achieve the same goal but with lower RAM usage?

    Read the article

  • Killing COM object from C#

    - by Pradeep
    I have a COM object that we are calling from C#. This works great, and I have my own pool of objects that I can use whenever I want. Now I need to kill the object. I've tried releasing the COM object explicitly and then garbage collecting from another thread, but that does nothing. Does anyone have any other ideas to kill this object? Thanks for the help. I've tried System.Runtime.InteropServices.Marshal.ReleaseComObject(myApp); GC.Collect(); GC.WaitForPendingFinalizers (); myApp = null; and I create it by myApplication.ApplicationClass myApp = new myApplication.ApplicationClass(); Thanks, Pradeep

    Read the article

  • Do I need to Dispose to deregister events?

    - by Sean
    Say I have two classes, and neither of them are GUI components. Class A is a short lived object that registers for an event declared by a long lived object B. For example public A(B b) { b.ChangeEvent += OnChangeEvent; } If A never deregisters from B's event, will A never be garbage collected? Does A need a Dispose method just to deregister from B's event? There is also a related second question. If A and B should both live for the entire execution time of the application, does A need to deregister?

    Read the article

  • Learning C++ from scratch in Visual Studio?

    - by flesh
    I need to get up to speed with C++ quite quickly (I've never used it previously) - is learning through Visual Studio (i.e. Managed C++) going to be any use? Or will I end up learning the extensions and idiosyncracies of C++ in VS, rather then the language itself? If learning in VS is not recommended, what platform / IDE do you guys suggest? Edit: Can anyone elaborate on what VS will hide or manage for me when coding unmanaged C++? I really need to be learning things like pointers, garbage collection and all the nuts and bolts of the low level language.. does VS abstract or hide any of this kind of stuff from you? Thanks for all the suggestions..

    Read the article

  • My site was recently attacked. What do I do?

    - by ChrisH
    This is a first for me. One of the sites I run was recently attacked. Not at all an intelligent attack - pure brute force - hit every page and every non-page with every extension possible. Posted with garbage data to every form and tried to post to some random urls too. All tod, 16000 requests in one hour. What should I do to prevent/alert this kind of behavior? Is there a way to limit the request/hr for a given ip/client? Is there a place I should be reporting the user to? They appear to be from China and did leave what seems like a valid e-mail.

    Read the article

  • Why should I reuse XmlHttpRequest objects?

    - by Xavi
    From what I understand, it's a best practice to reuse XmlHttpRequest objects whenever possible. Unfortunately, I'm having a hard time understanding why. It seems like trying to reuse XHR objects can increase code complexity, introduce possible browser incompatibilities, and lead to other subtle bugs. After researching this question for a while, I did come up with a list of possible explanations: Fewer objects created means less garbage collecting Reusing XHR objects reduces the chance of memory leaks The overhead of creating a new XHR object is high The browser is able to perform some sort of network optimization under hood But I'm not sure if any of these reasons are actually valid. Any light you can shed on this question would be much appreciated.

    Read the article

  • .Net OutOfMemory on Server but not Desktop

    - by Jörg Battermann
    Is it possible that the .Net framework behaves differently when it comes to garbage collection / memory limitations on server environments? I am running explicitly x86 compiled apps on a 64bit server machine with 32gbs of physical ram and I am running out of memory (SystemOutOfMemoryException) even though nothing but that particular app is running and the server/all other apps utilize 520mb total.. but I cannot reproduce that behaviour on my own (client win7) machine. Now I know that the app -is- memory intensive, but why is it causing problems on the server and not on the client?

    Read the article

  • How to easily pass a very long string to a worker process under Windows?

    - by sharptooth
    My native C++ Win32 program spawns a worker process and needs to pass a huge configuration string to it. Currently it just passes the string as a command line to CreateProcess(). The problem is the string is getting longer and now it doesn't fit into the 32K characters limitation imposed by Windows. Of course I could do something like complicating the worker process start - I use the RPC server in it anyway and I could introduce an RPC request for passing the configuration string, but this will require a lot of changes and make the solution not so reliable. Saving the data into a file for passing is also not very elegant - the file could be left on the filesystem and become garbage. What other simple ways are there for passing long strings to a worker process started by my program on Windows?

    Read the article

  • Help me find some good 'Reflection' reading materials??

    - by IbrarMumtaz
    If it wasn't you guys I would've never discovered Albahari.com's free threading ebook. My apologies if I come off as being extremely lazy but I need to make efficient use of my time and make sure am not just swallowing any garbage of the web. Therefore I am looking for the best and most informative and with a fair bit of detail for the Reflection chapter in .Net. Reflection is something that comes up time and time again and I want to extend my reading from what I know already from the official 70-536 book. I'm not a big fan of MSDN but at the moment that's al I'm using. Anyone got any other good published reading material off the inter web that can help revision for the entrance exam??? Would be greatly appreciated !!! Thanks in Advance, Ibrar

    Read the article

  • C# dealing with invalid user input

    - by Zka
    Have a simple console app where user is asked for several values to input. Input is read via console.readline(). Ex Name: Fred //string Lastname: Ashcloud //string Age: 28 //int I would like to make sure that int and double types are entered and if the user enters garbage, lets him repeat the procedure. Example, if the user enters "28 years old" where age expects int the app will crash. What is the best way to check for these inputs? Right now I can only think of: while (!Int32.TryParse(text, out number)) { Console.WriteLine("Error write only numbers"); text = Console.ReadLine(); } Is there any other way to do this? try catch statements if one wants to give a more detailed feedback to the user? How in that case?

    Read the article

  • Is there an API for listing queues and exchanges on RabbitMQ?

    - by parsenome
    I've looked quite a bit, but I haven't been able to find a good programmatic way to list the queues on a RabbitMQ server. This is important because I need to clean up my queues and exchanges when I'm done with them. I don't always have a good "done" event that can be used to trigger a cleanup, so I'd like to do it with more of a garbage collection model. If I can list the queues, I can verify that the objects that they're related to shouldn't be producing more entries and clean them up. I know I can use rabbitmqctl to do it, but that needs elevated privileges. Since I haven't been able to find a way to list the queues programmatically, I've been keeping a list of names in the database. That works, but it's ugly.

    Read the article

  • Why isn't my Ruby object deleted when the last reference goes out of scope?

    - by Andrew Clegg
    Hi gurus, I've found a weird effect when trying to track down a memory leak in a Rails app. Can anyone explain what's going on here? Save this script as a plain Ruby script (Rails not necessary): class Fnord def to_s 'fnord' end end def test f = Fnord.new end test GC.start sleep 2 ObjectSpace.each_object do |o| puts o if o.is_a? Fnord end When I run this via ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] I get the following: bash $ ruby var_test fnord Although the variable f is out of scope, there are no other references to the single Fnord object, and I've garbage collected, the object still seems to exist. Is this a nefarious memory leak of some sort, or am I completely missing something about Ruby? Further, if I change the test method to this: def test f = Fnord.new f = nil end I get no output. But surely this should not change the semantics here? Many thanks!

    Read the article

  • Python json memory bloat

    - by Anoop
    import json import time from itertools import count def keygen(size): for i in count(1): s = str(i) yield '0' * (size - len(s)) + str(s) def jsontest(num): keys = keygen(20) kvjson = json.dumps(dict((keys.next(), '0' * 200) for i in range(num))) kvpairs = json.loads(kvjson) del kvpairs # Not required. Just to check if it makes any difference print 'load completed' jsontest(500000) while 1: time.sleep(1) Linux top indicates that the python process holds ~450Mb of RAM after completion of 'jsontest' function. If the call to 'json.loads' is omitted then this issue is not observed. A gc.collect after this function execution does releases the memory. Looks like the memory is not held in any caches or python's internal memory allocator as explicit call to gc.collect is releasing memory. Is this happening because the threshold for garbage collection (700, 10, 10) was never reached ? I did put some code after jsontest to simulate threshold. But it didn't help.

    Read the article

  • Release an object without a pointer?

    - by Kai Friis
    I’ve just started developing for iPhone and am trying to get my head around memory management. I made a small program that shows a map and an annotation on the map. For the annotation I made a simple class that implements the MKAnnotation protocol. To create and add the annotation I wrote this: [self.myMapView addAnnotation:[[MyAnnotation alloc] init]]; It worked fine until I tried to release the object. Nothing to release. This is what I would have done in C#, I guess it doesn’t work without garbage collection? So is this the only way to do it? MyAnnotation *myAnnotation = [[MyAnnotation alloc] init]; [self.myMapView addAnnotation: myAnnotation]; [myAnnotation release];

    Read the article

  • How do I get started writing a .Net-wrapper around C++ Omniorb-stubs

    - by Superfisi
    Hello there, my job is to access a CPRBA-server-application from .NET 3.5. After evaluating projets like IIOP.Net (undefined state) and products like VisiBroker (expensive) I'd like to do it "by myself" and write a .Net-Wrapper around C++-Stubs generated my Omniidl (the Omniorb IDL to C++ generator). This means writing some kind of layer of managed code (CLI) around the unmanaged C++ code. My question is: Has anyone experience in this topic? I honestly don't know how to do it the best way. Right now I plan to create a managed class for every unmanaged class, each managed class itself has a member to an instance of the unmanaged class, which is not garbage-collected. Is this the right way to do it or am I on the wrong path? Thanks in advance!

    Read the article

  • Passing a Structure containing an array of String and an array of Integer into a C++ DLL

    - by DanJunior
    I'm having problems with marshaling in VB.NET to C++, here's the code : In the C++ DLL : struct APP_PARAM { int numData; LPCSTR *text; int *values; }; int App::StartApp(APP_PARAM params) { for (int i = 0; i < numLines; i++) { OutputDebugString(params.text[i]); } } In VB.NET : <StructLayoutAttribute(LayoutKind.Sequential)> _ Public Structure APP_PARAM Public numData As Integer Public text As System.IntPtr Public values As System.IntPtr End Structure Declare Function StartApp Lib "AppSupport.dll" (ByVal params As APP_PARAM) As Integer Sub Main() Dim params As APP_PARAM params.numData = 3 Dim text As String() = {"A", "B", "C"} Dim textHandle As GCHandle = GCHandle.Alloc(text) params.text = GCHandle.ToIntPtr(textHandle) Dim values As Integer() = {10, 20, 30} Dim valuesHandle As GCHandle = GCHandle.Alloc(values) params.values = GCHandle.ToIntPtr(heightHandle) StartApp(params) textHandle.Free() valuesHandle.Free() End Sub I checked the C++ side, the output from the OutputDebugString is garbage, the text array contains random characters. What is the correct way to do this?

    Read the article

  • problem with ansi c unexpected behaviour?

    - by moon
    hi to all! i am suffering with an unexpected behavior,here is problem definitation i have applications communicating on LAN via UDP protocol, i am reading the Ip and Port no from a text file, initially the Ip and Port is working nicely but after some time the Ip that is a char array is corrupted and it takes garbage values, also the file writing is effected by this i mean the values that are in ip array are also written in text file that is written by the same application, i cant understand what is the problem. sorry for weak english. thanx in advance.

    Read the article

  • Count down timer

    - by Ohmnastrum
    I have a timer set up and it gets called when ever the player is in their turn phase. I also have a multiplier that decrements slowly while the player is committing actions. for some odd reason my mult variable is returning garbage values I initialized it to 1 in the onLoad statement but it still seems to have trouble. -(void) Timerbar:(NSTimer *)barTimer { if(!waitForPlayer) { [barTimer invalidate]; } if(mult > 0.0) { mult -= 0.01; if(mult < 0) { mult = 0; } } power = (mult * 10) / pwrBarMaxWidth; pwrBarWidth = (int)power % limit; NSLog(@"%d", mult); } Do I have a syntax error somewhere?

    Read the article

  • ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException

    - by Phil Bennett
    My website has been giving me intermittent errors when trying to perform any Ajax activities. The message I get is Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near ' So its obviously some sort of server timeout or the server's just returning back mangled garbage. This generally, unfortunately not always, happens when the site has been idle for a while. Anybody else been able to overcome this? Thanks

    Read the article

  • Free object/widget in GTK?

    - by wag2639
    I've got a pack box in my GTK application and I'm replacing it every once in a while with a completely new entry (at least for now cause I'm in a hurry). Since I'm replacing it with a new instance, do I need to explicitly free from memory the old pack box contents or is there some garbage collection in GTK? If I do need to explicitly need to free the object, is there a command that will recursively go to all objects in that tree (like will it clear my button in a box container inside my main pack box)? I'm using C/GTK-2.0 (gcc v4.4.3 and GTK 2.20.0).

    Read the article

  • Can I have code that executes before and after tests are run by NUnit?

    - by Billy ONeal
    I've got a bunch of tests in NUnit which create garbage data on the filesystem (bad, I know, but I have little control over this). Currently we have a cleanup tool that removes these temporaries and such, but I'd like to be able to run that cleanup tool automatically. I'd have to be able to run it after all tests have finished running. I have similar checking that I'd like to do at the beginning, to ensure that there are none of these temporaries left from previous runs that might change the outcome of the tests. Is such a thing simple or am I going to have to implement a whole new test runner for such a thing?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >