memory-leaks

Why am I getting memory errors when accessing this matrix in OpenCV?

喜你入骨 提交于 2019-12-23 17:26:27
问题 I'm simply trying to write to a matrix of a given size. When I run this program in Valgrind, I get memory errors as shown below: main.cpp: #include <iostream> #include <opencv2/opencv.hpp> int main() { cv::Mat m = cv::Mat::zeros(cv::Size(59, 9), CV_32SC1); m.at<int>(9, 4) = 1; } Compiling instructions: g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -L/usr/local/lib/ -g -o binary main.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv

C++ Boost ASIO async_send_to memory leak

旧时模样 提交于 2019-12-23 17:18:45
问题 I am currently working on a UDP socket client. I am currently noticing a memory leak and I've tried several things in hopes to squash it, but it still prevails. In my main, I have a char* that has been malloc 'd. I then call the below function to send the data: void Send(const char* data, const int size) { Socket.async_send_to(boost::asio::buffer(data, size), Endpoint, boost::bind(&MulticastSender::HandleSendTo, this, boost::asio::placeholders::error)); } If I run this code, it will always

bitmap size exceeds VM budget Error on Android

谁说胖子不能爱 提交于 2019-12-23 17:03:17
问题 I'm loading 100 images from Asset folder to an array object. The pictures are quite small (png ~20k each), and im using this code do to it, and to prevent memory leak & optimized performances: in a loop: // create resized bitmap from asset resource InputStream istr = assetManager.open(pics[i]); Bitmap b = BitmapFactory.decodeStream(istr); b = Bitmap.createScaledBitmap(b, 240, 240, true); where pics[i] is a list of filenames which sits in my Asset folder. The code works for me, but i still

tomcat 7.0 and jax-ws 2.2.5 memory leak

一笑奈何 提交于 2019-12-23 16:55:08
问题 i'm building a ws with tomcat and jax-ws. when i stop my application, generally while redeploying from eclipse, i get this message: 25-mar-2012 16.21.16 com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy INFO: WSSERVLET15: JAX-WS servlet destroyed 25-mar-2012 16.21.16 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed INFO: WSSERVLET13: JAX-WS context listener destroyed 25-mar-2012 16.21.16 org.apache.catalina.loader.WebappClassLoader

WP8 Memory leak opening and closing PhoneApplicationPage

假如想象 提交于 2019-12-23 16:41:53
问题 I'm creating a Windows phone application that shows a list of thumbnails. I'm using a LongListSelector to do it. My application has memory leaks when I navigate forward and backward to the thumbnails list some times. I review the memory usage while using the App and I see that the memory increases when opening the page with the thumbnails (as I expect to). When I navigate back to the previous page the memory usage decrease but not as much at it was increased. Repeating the proces several

Unloading Clojure vars from JVM thread-local space

五迷三道 提交于 2019-12-23 16:16:15
问题 I'm writing a plugin for BaseX in Clojure, built via "lein uberjar" with the Clojure interpreter included. For the most part, this works well. However -- when running via the BaseX HTTP instance, evaluation takes place inside Jetty's thread pool rather than having threads thrown away after a client disconnects. As loading the plugin loads Clojure's classes through a custom classloader, and throwing away the (AOT-compiled) object instance which acts as the plugin's entry point does not discard

Python C API: Assigning PyObjects to a dictionary causes memory leak

不问归期 提交于 2019-12-23 16:15:24
问题 I am writing a C++ wrapper for Python using the Python C API. In my case I have to make bigger amounts of byte oriented data accessible for the Python script. For this purpose I use the PyByteArray_FromStringAndSize method to produce a Python bytearray (https://docs.python.org/2.7/c-api/bytearray.html). When returning this bytearray directly I have not experienced any problems. When however adding the bytearray into a Python dict, the memory from the bytearray will not be released once the

Is an event bus unregister necessary

穿精又带淫゛_ 提交于 2019-12-23 16:01:26
问题 I'm implementing MVP pattern in Android and I'm using EventBus to let know the P resenter from activity "A" that something happen at activity "B" to update views from "A". I registered the presenter to EventBus inside in constructor but I don't see any place where I could unregister it. public class PresenterA extends nucleus.presenter.Presenter<ViewA> { public PresenterA() { EventBus.getDefault().register(this); } public void onEvent(ChangesEvent e) { // change views } } Is it necessary to

Is wordexp in libc on OSX 10.9.5 known to leak?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 15:57:48
问题 Is wordexp on OSX 10.9.5 known to leak memory? And if not, what is wrong with my code? On my own local machine running OSX 10.10.5 I run my code through Valgrind and get no lost bytes . No leaks on my Ubuntu Linux machine either. However, when I turned on valgrind checks on my travis-ci account that uses OSX 10.9.5 I suddenly get a leak from memory allocated inside of wordexp even though I free it using wordfree as the man page describes: ==8968== LEAK SUMMARY: ==8968== definitely lost: 1,024

My app leaks Bitmaps of random shapes that I don't have in my drawable folder

五迷三道 提交于 2019-12-23 15:51:34
问题 I have a strange memory leak problem where my app keeps leaking Bitmap objects and other objects related like VectorDrawables , AnimationDrawables I have via Eclipse Memory Analyzer and Gimp been able to recover the leaked Bitmap objects and found out that they are random shapes of stars, and squars or circles. I dont have any of these shapes in my res/drawable folders. Where do they come from and why are they leaking so much? This leak happend on my Samsung Galaxy S7 - Android 7.0 and on