memory-leaks

MEF: difference between GetExportedValue and SatisfyImports

假装没事ソ 提交于 2019-12-22 08:34:50
问题 We're using MEF (.NET 4, can't use 4.5 at the moment) in a MVVM application. Everything was fine until we needed to create models on the fly, for instance editable rows of a table. I didn't want to run into memory leaks, I found this article http://pglazkov.blogspot.ch/2011/04/mvvm-with-mef-viewmodelfactory.html and I discovered an unexpected behavior that I would like to understand. This is an Item added to the Shell.Items observable collection: [PartCreationPolicy(CreationPolicy.NonShared)]

Impossible Java memory references in Heap Dump

前提是你 提交于 2019-12-22 08:07:15
问题 I have a Java Heap Dump taken at 7:41pm which I am analysing with Eclipse Memory Analysis Tool. The heap dump includes 20 session objects. Using the Path to GC Roots command on one of these session objects in my heap shows the following 3 references to the session object. A finalizer reference from the "unfinalized" linked list owned by the Finalizer thread. My object is 3rd in line to be finalized. A strong reference to the session object from a message handler thread which is itself

Allocation numbers in C++ (windows) and its predictibility

99封情书 提交于 2019-12-22 06:46:12
问题 I am using _CrtDumpMemoryLeaks to identify memory leaks in our software. We are using a third party library in a multi-threaded application. This library does have memory leaks and therefore in our tests we want to identify those that ours and discard those we do not have any control over. We use continuous integration so new functions/algorithms/bug fixes get added all the time. So the question is - is there a safe way of identifying those leaks that are ours and those that are the third

java memory leak, visualvm showing wrong data

孤人 提交于 2019-12-22 06:29:43
问题 I've a java application running, after few hours it fulfills memory. I've tried to detect memory leak with visualvm but it shows wrong data (have no idea how that can happen). In the screenshot you can see task manager showing memory usage of 700Mb and visualvm showing 225... Does anyone know whats going on here? Regards 回答1: Beware that your OS is only aware of the total amount of memory java has reserved over the time (and java will not return that amount of memory easily AFAIK). However

Most Common Memory/Resource Leak Errors

独自空忆成欢 提交于 2019-12-22 06:00:48
问题 All good C++ programmers know how to avoid leaking memory (or resources like sockets): Always use smart pointers, i. e.: std::auto_ptr , boost::shared_ptr . Always be aware of ownership of object: who owns, who refers, who is responsible, etc. But, memory leaks still happen. Point most common issues when you discovered a memory leak in a program, even when you used the above techniques. I start: Sometimes you forget to define a destructor of base class as virtual. So all derived classes

oink logs command not working on heroku

馋奶兔 提交于 2019-12-22 05:51:10
问题 I recently started using the oink gem on my heroku app because I noticed a small memory leak with some controller actions. The oink logs command works fine locally but I can't figure out the command to get it to work on my production site. Here's the command I'm trying: heroku run oink /log/* And here's the line from my production.rb file: config.middleware.use( Oink::Middleware, :logger => Rails.logger ) On my local installation, oink is storing the logs in the /log/oink.log file. 回答1: Here

Internet Explorer 11 : Memory Leak on blank page?

a 夏天 提交于 2019-12-22 05:48:46
问题 Internet Explorer 11 | Version: 11.0.9600.17280 | Update Versions: 11.0.12 (KB2977629) HTML page <!DOCTYPE html> <html> <head> </head> <body> </body> </html> Method of Testing Navigate to page Open Developer Tools (F12) Switch to Memory Tab Start Profiling Session Hold down Refresh button on page (F5) Watch the memory climb Memory Usage Picture Other Details I have already disabled all plug-ins any other information I should provide? The Questions Can anyone confirm if this problem is limited

Scala Iterable Memory Leaks

假如想象 提交于 2019-12-22 05:46:49
问题 I recently started playing with Scala and ran across the following. Below are 4 different ways to iterate through the lines of a file, do some stuff, and write the result to another file. Some of these methods work as I would think (though using a lot of memory to do so) and some eat memory to no end. The idea was to wrap Scala's getLines Iterator as an Iterable. I don't care if it reads the file multiple times - that's what I expect it to do. Here's my repro code: class FileIterable(file:

iPhone memory warnings and crashes - but Instruments showing lowish memory use

泪湿孤枕 提交于 2019-12-22 05:40:13
问题 I have a strange memory issue I'm having problems resolving and would appreciate some advice as to where else to look. The program I have (iPhone App) has a function whereby it basically downloads loads of files, processes those that are JSON, and stores the rest to disk. The JSON processing is CPU intensive and can take several seconds per file, so I have a NSOperationQueue with maxConcurrency limited to 1 that handles all the heavy lifting, and a queue that manages the multiple files to

Error summary in Valgrind output?

霸气de小男生 提交于 2019-12-22 05:33:36
问题 I have seen some of the post regarding valgrind but not single post helped me in understanding interpretation of valgrind output. I ran two programs with valgrind (Both having memory leaks) Sample Output for Test 1 ==20422== LEAK SUMMARY: ==20422== definitely lost: 448 bytes in 3 blocks ==20422== indirectly lost: 786,460 bytes in 1 blocks ==20422== possibly lost: 1,576,052 bytes in 46 blocks ==20422== still reachable: 1,077,107 bytes in 2,333 blocks ==20422== suppressed: 0 bytes in 0 blocks =