memory-leaks

Detect when IE11, with its built-in memory leak, runs out of memory (1.5GB recyclable pool)

本小妞迷上赌 提交于 2020-01-22 20:06:28
问题 IE11 has a well-documented iframe memory leak. In a SPA, if you are using iframes the memory will grow to about 1.5GB after which time it will slow down until a crash. My task is to detect when the browser is about to crash and restart the page soon enough. The application is Vue.JS that is embedded inside ASP.NET MVC. What kind of memory/performance detection is available in browser in IE11? Some kind of used memory measure library? Some kind of performance measuring library? Counting

Does using static methods and properties in PHP use less memory?

一世执手 提交于 2020-01-22 17:21:29
问题 I'm working on a web application that sees dozens of concurrent users per second. I have a class that will be instantiated many times within the same page load. In that class, I have some properties that will always be the same across every object, so I'm thinking about declaring these properties as static in an effort to reduce the memory that will be used when multiple instances of this class are instantiated during the same page request. Will doing this use less memory for this application

Does using static methods and properties in PHP use less memory?

喜欢而已 提交于 2020-01-22 17:20:07
问题 I'm working on a web application that sees dozens of concurrent users per second. I have a class that will be instantiated many times within the same page load. In that class, I have some properties that will always be the same across every object, so I'm thinking about declaring these properties as static in an effort to reduce the memory that will be used when multiple instances of this class are instantiated during the same page request. Will doing this use less memory for this application

Memory leak in JDBC4Connection

為{幸葍}努か 提交于 2020-01-22 12:39:51
问题 I'm trying to catch a memory leak in one of our Java daemons, and after dumping the memory and analyzing it via Memory Analyzer Tool, noticed that most of the leak is caused by the JDBC4Connection: 10 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$AppClassLoader @ 0x2aaab620ed00" occupy 858,283,752 (81.55%) bytes. Biggest instances: * com.mysql.jdbc.JDBC4Connection @ 0x2aaab64ad820 - 87,110,160 (8.28%) bytes. * com.mysql.jdbc.JDBC4Connection @ 0x2aaab64af520 - 86

Python/Django polling of database has memory leak

本秂侑毒 提交于 2020-01-22 06:00:31
问题 I've got a Python script running Django for database and memcache, but it's notably runnning as a standalone daemon (i.e. not responding to webserver requests). The daemon checks a Django model Requisition for objects with a status=STATUS_NEW , then marks them STATUS_WORKING and puts them into a queue. A number of processes (created using the multiprocess package) will pull things out of the Queue and do work on the Requisition with the pr.id that was passed to the Queue. I believe the memory

java stackoverflowerror thrown in infinite loop

空扰寡人 提交于 2020-01-22 02:15:30
问题 I have the following function that starts a jsvc daemon for receiving UDP messages: @Override public void start() throws Exception { byte[] buf = new byte[1000]; DatagramPacket dgp = new DatagramPacket(buf, buf.length); DatagramSocket sk; sk = new DatagramSocket(1000); sk.setSoTimeout(0); byte[] rcvMsg = null; run(sk, dgp, rcvMsg); } With a timeout of 0, the socket blocks until a another message comes in. This is what triggers the continuous run through the following while loop:

Why is this not a memory leak in C++?

强颜欢笑 提交于 2020-01-21 12:21:45
问题 A couple of months ago I asked this question where I asked why there was a memory leak. Apparently, I forgot a virtual destructor. Now I'm struggling to understand why this is not a memory leak: #include <iostream> #include <vector> #include <memory> using namespace std; class Base{ public: explicit Base(double a){ a_ = a; } virtual void fun(){ cout << "Base " << a_ << endl; } protected: double a_; }; class Derived : public Base{ public: Derived(double a, double b): Base(a), b_{b}{ } void fun

Do all UWP apps leak memory when navigating pages?

喜欢而已 提交于 2020-01-21 03:01:04
问题 So I've been getting my teeth into UWP and developing a simple app in C# using VS2017 v15.6.4, on the latest release of Windows 10. When running the app I notice its memory usage continues to increase over time. After a lot of pairing back of the code, I've come to the conclusion that this is being caused by page navigation calls, such as: Frame.Navigate(typeof SomePage); Frame.GoBack(); Frame.GoForward(); It is very easy to create and observe this process... 1) In VS2017, create a new Blank

Ruby on Rails memory leak when looping through large number of records; find_each doesn't help

泪湿孤枕 提交于 2020-01-20 17:10:46
问题 I have a Rails app that processes a large (millions) number of records in a mysql database. Once it starts working, its memory use quickly grows at a speed of 50MB per second. With tools like oink I was able to narrow down the root cause to one loop that goes through all the records in a big table in the database. I understand if I use something like Person.all.each , all the records will be loaded into memory. However if I switch to find_each , I still see the same memory issue. To further

Ruby on Rails memory leak when looping through large number of records; find_each doesn't help

旧城冷巷雨未停 提交于 2020-01-20 17:09:13
问题 I have a Rails app that processes a large (millions) number of records in a mysql database. Once it starts working, its memory use quickly grows at a speed of 50MB per second. With tools like oink I was able to narrow down the root cause to one loop that goes through all the records in a big table in the database. I understand if I use something like Person.all.each , all the records will be loaded into memory. However if I switch to find_each , I still see the same memory issue. To further