memory-leaks

Compiling with OpenMP results in a memory leak

青春壹個敷衍的年華 提交于 2019-12-23 21:30:52
问题 According to valgrind, I can induce a memory leak when compiling a simple hello-world program with OpenMP. This doesn't make sense, because the hello-world program does not intentionally use any OpenMP functionality. Suppose the program below is named hi.c and compiled according to $ gcc -o hi hi.c GCC version 4.8.3 #include <stdio.h> int main( void ) { printf( "hi\n" ); return 1; } We should expect a leak report from valgrind to verify the obvious: there are no leaks. My observations agree

Memory leak using google charts with ajax

喜夏-厌秋 提交于 2019-12-23 21:28:53
问题 I'm fairly new to javascript and I'm having trouble finding a memory leak in some code which updates a google chart each second with ajax data. My code (simplified to a small test case): function TimeLine(id, max) { this.chart = new google.visualization.LineChart(document.getElementById(id)); this.vals = new google.visualization.DataTable(); this.vals.addColumn('number', 'Index'); for (var i = 2; i < arguments.length; i++) { this.vals.addColumn('number', arguments[i]); } this.numCols =

Memory Leak with NSMutableString appendString

谁说胖子不能爱 提交于 2019-12-23 21:10:02
问题 I am using an XMLParser to parse some XML data, which uses an NSMutableString *resultString to store the tag characters. At every (- parser: didStarElement...) method I allocate and init the resultString-ivar. - (void)parser: (NSXMLParser *)parser didStartElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName: (NSString *)qName attributes: (NSDictionary *)attributeDict { // Alot of if-statements to sort subtags // /.../ resultString = [[NSMutableString alloc]

Memory Leak iOS (UIImageView,UIImage,CGImage) not freed on ARC

北战南征 提交于 2019-12-23 21:03:56
问题 Im trying to implement a simple video stream but for some reason my memory won't get freed: (void)updateImage:(UIImage *)image{ self.indicator.hidden = TRUE; //CGImageRelease([self.imageView.image CGImage]); self.imageView.image = nil; self.imageView.image = image; [self.imageView setNeedsDisplay]; } If I use CGImageRelease([self.imageView.image CGImage]); memory will be freed. But when I return to a previous view controller the app will crash as it tries to free the allocated memory for that

Instruments reporting memory leak whenever AVSpeechSynthesizer is used to read text

送分小仙女□ 提交于 2019-12-23 19:29:48
问题 Everytime I use AVSpeechSynthesizer to speak text Instruments reports a memory leak in the AXSpeechImplementation library. Here's the code I'm using to make the call: AVSpeechUtterance *speak = [AVSpeechUtterance speechUtteranceWithString:text]; speak.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; speak.rate = AVSpeechUtteranceMaximumSpeechRate * .2; [m_speechSynth speakUtterance:speak]; Here's the link to the Instruments screenshot http://imageshack.com/a/img690/7993/b9w5.png

SwiftUI - Possible Memory Leak

吃可爱长大的小学妹 提交于 2019-12-23 19:20:05
问题 I recently started looking into SwiftUI and have run through a few tutorials which recommend swapping views based on state (see the snippet below). However, I noticed while debugging that memory usage slowly creeps up with even the most basic UI. This may just be lack of knowledge but is it wrong to swap views in this sort of manner with SwiftUI? Version 11.0 (11A420a) - iOS 13 // Memory Leak Test struct ContentView: View { @State private var toggle = false func cycleViews() { DispatchQueue

XmlSerializer.FromTypes producing memory leaks?

无人久伴 提交于 2019-12-23 19:12:29
问题 According to MSDN XmlSerializer Class section "Dynamically Generated Assemblies" the XmlSerializer produces memory leaks when using certain constructors. I wonder if the XmlSerializer.FromTypes(Type[]) method produces memory leaks, too? EDIT: I'm experiencing memory problems, when using the FromTypes method. So i started some investigations: for (int i = 0; i < 1000; i++) { DummyObject content = new DummyObject() { Age = 29, Location = "London", Name = "Pete" }; XmlSerializer serializer =

Memory leaks in MyFaces

守給你的承諾、 提交于 2019-12-23 18:31:04
问题 EDIT: The solution that you can find in comments below assumes changing JSF implemenetation from MyFaces to Sun's Mojarra. Hi, I have got really annoying problem with MyFaces 2.0.0 (To be more precisely I checked it out also on 2.0.1 and 2.0.2 and problem remains). I'm writing now application under MyFaces. Briefly speaking in my application i use frameworks: Spring, Hibernate, JSF (MyFaces implementation) My application container is Tomcat (6.0.29 version) I use maven to build and deploy

ToolTip Memory leak in WPF while binding a View to ViewModel

梦想的初衷 提交于 2019-12-23 18:05:20
问题 I have an application in WPF , MVVM . Shows a list of Images in a ListBox each image is associated to different session. My ListBox ItemTemplate looks like this, <ListBox.ItemTemplate> <DataTemplate> <Image Source="{Binding IsClaims,Converter={StaticResource PolicyClaimsImageSelector}}" ToolTipService.ShowDuration="7000"> <Image.ToolTip> <StackPanel> <TextBlock Text="{Binding WorkingSessionName}" /> <Views:ToolTipView DataContext="{Binding ThisViewModel}"/> </StackPanel> </Image.ToolTip> <

Why the Application and it's resources are being kept in the memory after exiting in Android?

时光总嘲笑我的痴心妄想 提交于 2019-12-23 17:48:02
问题 I have a simple Hello World application public class TestLeaksOnFinish extends Activity { static int ctr = 0; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView t = new TextView(this); t.setText("Hello World! "+ctr++); setContentView(t); } } When I run this multiple times, each time followed by pressing BACK, I see that ctr increases each time, indicating that the Activity is not killed completely after BACK. This is also confirmed by dumping the