Search Results

Search found 36810 results on 1473 pages for 'project management'.

Page 47/1473 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • UINavigationController and memory management

    - by Dan Ray
    - (void)launchSearch { EventsSearchViewController *searchController = [[EventsSearchViewController alloc] initWithNibName:@"EventsSearchView" bundle:nil]; [self.navigationController pushViewController:searchController animated:YES]; //[searchController release]; } Notice the [searchController release] is commented out. I've understood that pushing searchController onto the navigation controller retains it, and I should release it from my code. I did just alloc/init it, after all, and if I don't free it, it'll leak. With that line commented out, navigation works great. With it NOT commented out, I can navigate INTO this view okay, but coming back UP a level crashes with a *** -[CFArray release]: message sent to deallocated instance 0x443a9e0 error. What's happening here? Is the NavigationController releasing it for me somehow when it goes out of view? The boilerplate that comes on a UINavigationController template in XCode has the newly-pushed controller getting released. But when I do it, it fails.

    Read the article

  • Obj-C memory management: why doesn't this work?

    - by igul222
    Why doesn't the following code work? MyViewController *viewController = [[MyViewController alloc] init]; [myWindow addSubview:viewController.view]; [viewController release]; As I understand, myWindow should be retaining viewController.view for as long as the window needs it. So why does this cause my app to crash on launch? (commenting out the last line fixes the problem, as expected)

    Read the article

  • Chaining animations and memory management

    - by bryan1967
    Hey Everyone, Got a question. I have a subclassed UIView that is acting as my background where I am scrolling the ground. The code is working really nice and according to the Instrumentation, I am not leaking nor is my created and still living Object allocation growing. I have discovered else where in my application that adding an animation to a UIImageView that is owned by my subclassed UIView seems to bump up my retain count and removing all animations when I am done drops it back down. My question is this, when you add an animation to a layer with a key, I am assuming that if there is already a used animation in that entry position in the backing dictionary that it is released and goes into the autorelease pool? For example: - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { NSString *keyValue = [theAnimation valueForKey:@"name"]; if ( [keyValue isEqual:@"step1"] && flag ) { groundImageView2.layer.position = endPos; CABasicAnimation *position = [CABasicAnimation animationWithKeyPath:@"position"]; position.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; position.toValue = [NSValue valueWithCGPoint:midEndPos]; position.duration = (kGroundSpeed/3.8); position.fillMode = kCAFillModeForwards; [position setDelegate:self]; [position setRemovedOnCompletion:NO]; [position setValue:@"step2-1" forKey:@"name"]; [groundImageView2.layer addAnimation:position forKey:@"positionAnimation"]; groundImageView1.layer.position = startPos; position = [CABasicAnimation animationWithKeyPath:@"position"]; position.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; position.toValue = [NSValue valueWithCGPoint:midStartPos]; position.duration = (kGroundSpeed/3.8); position.fillMode = kCAFillModeForwards; [position setDelegate:self]; [position setRemovedOnCompletion:NO]; [position setValue:@"step2-2" forKey:@"name"]; [groundImageView1.layer addAnimation:position forKey:@"positionAnimation"]; } else if ( [keyValue isEqual:@"step2-2"] && flag ) { groundImageView1.layer.position = midStartPos; CABasicAnimation *position = [CABasicAnimation animationWithKeyPath:@"position"]; position.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; position.toValue = [NSValue valueWithCGPoint:endPos]; position.duration = 12; position.fillMode = kCAFillModeForwards; [position setDelegate:self]; [position setRemovedOnCompletion:NO]; [position setValue:@"step1" forKey:@"name"]; [groundImageView1.layer addAnimation:position forKey:@"positionAnimation"]; } } This chains animations infinitely, and as I said one it is running the created and living object allocation doesn't change. I am assuming everytime I add an animation the one that exists in that key position is released. Just wondering I am correct. Also, I am relatively new to Core Animation. I tried to play around with re-using the animations but got a little impatient. Is it possible to reuse animations? Thanks! Bryan

    Read the article

  • Optimizing processing and management of large Java data arrays

    - by mikera
    I'm writing some pretty CPU-intensive, concurrent numerical code that will process large amounts of data stored in Java arrays (e.g. lots of double[100000]s). Some of the algorithms might run millions of times over several days so getting maximum steady-state performance is a high priority. In essence, each algorithm is a Java object that has an method API something like: public double[] runMyAlgorithm(double[] inputData); or alternatively a reference could be passed to the array to store the output data: public runMyAlgorithm(double[] inputData, double[] outputData); Given this requirement, I'm trying to determine the optimal strategy for allocating / managing array space. Frequently the algorithms will need large amounts of temporary storage space. They will also take large arrays as input and create large arrays as output. Among the options I am considering are: Always allocate new arrays as local variables whenever they are needed (e.g. new double[100000]). Probably the simplest approach, but will produce a lot of garbage. Pre-allocate temporary arrays and store them as final fields in the algorithm object - big downside would be that this would mean that only one thread could run the algorithm at any one time. Keep pre-allocated temporary arrays in ThreadLocal storage, so that a thread can use a fixed amount of temporary array space whenever it needs it. ThreadLocal would be required since multiple threads will be running the same algorithm simultaneously. Pass around lots of arrays as parameters (including the temporary arrays for the algorithm to use). Not good since it will make the algorithm API extremely ugly if the caller has to be responsible for providing temporary array space.... Allocate extremely large arrays (e.g. double[10000000]) but also provide the algorithm with offsets into the array so that different threads will use a different area of the array independently. Will obviously require some code to manage the offsets and allocation of the array ranges. Any thoughts on which approach would be best (and why)?

    Read the article

  • Which project management software for technophobes who've never worked with something like that?

    - by Ernst
    Hi, Our director has asked me to get something to manage projects. Note that so far we haven't used anything of the sort. I did not get very clear instructions yet, probably because she doesn't know exactly what we need either. My guess is, we'll only find out while using something. I've looked at some, openworkbench, ganttproject, and microsoft project. The latter has the advantage of easy importing of users from exchange, are there others that do that (even if not directly, easily)? I don't think it's a critical requirement though. We're using some other custom software where I have to add users manually anyway and we're small enough that it's maybe once a month that I have to add or remove a user. In any case, I'm not in favour of buying anything, since I'm skeptic about us actually succeeding in putting it to good use, and even if we do, we will only during usage discover what we need. We're also not a tech shop, most people vary from not very technically adept to technophobic. This means we need something very userfriendly. I prefer to stay away from online solutions, since we deal with sensitive information and I prefer to keep that in house, but I guess it would be acceptable for the trial period. An intranet site is an option though, but preferably something that is easy to set up with IIS. Xplanner plus and redmine I found too hard to set up for this experiment. Some other options I haven't yet tried to install, but which look to complex for our technophobes: Endeavour Software Project Management, Project-Open, Trac. Any suggestions? Thanks, Ernst

    Read the article

  • MVC-3 User-Image Management - Best Practices

    - by Rob
    Hello Experts, Developing using MVC-3, Razor, C# Been searching around and cannot find advice I'm looking for. My site will contain user-uploaded images (possibly a high number). What is the best practice for managing these pictures (placement, breakdown into sub-folders, etc...)? Where do I place them that will prevent them from getting accidentally blown away if I republish my site periodically? If there are any good articles or blog posts, that would be helpful. Also, any advice/tips anyone wants to add would be great. Thanks for your time! Rob EDIT Also would like to know what people do to prevent hot linking.

    Read the article

  • Memory management technique for Objective-C iVars/properties

    - by David Rea
    Is the following code doing anything unnecessary? @interface MyClass { NSArray *myArray; } -(void)replaceArray:(NSArray *)newArray; @implementation MyClass -(void)replaceArray:(NSArray *)newArray { if( myArray ) { [myArray release]; myArray = nil; } myArray = [[NSArray alloc] initWithArray: newArray]; } @end What if I made the following changes: 1) Made myArray a property: @property (nonatomic, retain) NSArray myArray; 2) Changed the assignment to: self.myArray = [NSArray arrayWithArray: newArray]; Would that allow me to remove the conditional?

    Read the article

  • Custom UIButton Memory Management in dealloc

    - by ddawber
    I am hoping to clarify the processes going on here. I have created a subclass of UIButton whose init method looks like this: - (id)initWithTitle:(NSString *)title frame:(CGRect)btnFrame { self = [UIButton buttonWithType:UIButtonTypeCustom]; [self setTitle:title forState:UIControlStateNormal]; self.frame = btnFrame; return self; } In my view controller I am creating one of these buttons and adding it as a subview: myButton = [[CustomButton alloc] initWithTitle:@"Title" frame:someFrame]; [self.view addSubview:myButton]; In the view controller's dealloc method I log the retain count of my button: - (void)dealloc { NSLog(@"RC: %d", [myButton retainCount]); //RC = 2 [super dealloc]; NSLog(@"RC: %d", [myButton retainCount]); //RC = 1 } The way I understand it, myButton is not actually retained, even though I invoked it using alloc, because in my subclass I created an autorelease button (using buttonWithType:). In dealloc, does this mean that, when dealloc is called the superview releases the button and its retain count goes down to 1? The button has not yet been autoreleased? Or do I need to get that retain count down to zero after calling [super dealloc]? Cheers.

    Read the article

  • iPhone memory management, a newbie question

    - by Reuven
    Hi, I've seen in (Apple) sample code two types of ways of allocation memory, and am not sure I understand the difference and resulting behavior. // FAILS NSMutableArray *anArray = [NSMutableArray array]; [anArray release]; // WORKS NSMutableArray *anArray1 = [[NSMutableArray alloc] init]; [anArray release]; By "FAILS" I mean I get crashes/runtime warnings etc., and not always as soon as I call the release... Any explanation appreciated. Thanks

    Read the article

  • Re-add missing project without having to re-add it to all projects referencing it

    - by coffeeaddict
    Lets say you open a .NET solution (mine being VS 2010) after you just moved your entire folder to some new location locally. Now one of the projects that was being referenced in that solution is not there and so when you launch VS, it naturally tells you that the project is missing and therefore as always you see the project greyed out in Solution Explorer. Ok, well I can't go re-add that project (specify a different path for where that project lives) unless I remove the missing project reference and then try to re-add it back to the solution. But how can I reassociate a project without losing all references in other projects that were referencing that missing project? Is this possible? Otherwise every time I re-add that missing project, I end up having to go through about 8 projects of mine that are referencing it and re-reference it for each one of those projects which is tedious. I guess it makes sense since each project was referencing that missing project at that old path so it would break it there as well but is there an easier way to re-associate a project and references to that missing project without having to take 10 minutes every time to re-associate it all over the place if simply the path has changed?

    Read the article

  • Memory management for "id<ProtocolName> variableName" type properties

    - by Malakim
    Hi, I'm having a problem with properties of the following type: id<ProtocolName> variableName; ..... ..... @property (nonatomic, retain) id<ProtocolName> variableName; I can access and use them just fine, but when I try to call [variableName release]; I get compiler warnings: '-release' not found in protocol(s) Do I need to define a release method in the interface, or how do I release the memory reserved for the variable? Thanks!

    Read the article

  • iPhone memory management: a release after setting self.someProperty = nil

    - by ddawber
    I am reading the LazyTableImages code that Apple have released and they do something to this effect (in an NSOperation subclass): - (void)dealloc { [myProperty release]; [myProperty2 release]; } - (void)main { // // Parse operation undertaken here // self.myProperty = nil; self.myProperty2 = nil; } My thinking is that they do this in case dealloc is called before setting properties to nil. Is my thinking correct here? Are the releases unnecessary, as self.myProperty = nil effectively releases myProperty? One thing I have noticed in this code is that they don't release all retained objects in dealloc, only some of them, which is really the cause for my confusion. Cheers

    Read the article

  • Why is memory management so visible in Java?

    - 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 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.

    Read the article

  • iphone memory management: alloc and retain properties.

    - by Jonathan
    According to the docs, you do one release per alloc or retain (etc) However what about when using retain propertys? eg: HEADER @property(retain)UIView *someView; IMPLEMENTATION /*in some method*/ UIView *tempView = [[UIView alloc] init]; //<<<<<ALLOC - retain count = +1 [tempView setBackgroundColor:[UIColor redColor]]; self.someView = tempView; ///<<<<<RETAIN - retain count = +2 [tempView release]; ///should I do this? or a different version of the IMPLEMENTATION self.someView = [[UIView alloc] init]; //<<<<<ALLOC & RETAIN - retain count = +2 //now what??? [self.someView release]; ???? EDIT: I didn't make it clear, but I meant what to do in both circumstances, not just the first.

    Read the article

  • Simple Obj-C Memory Management Question

    - by yar
    This is from some sample code from a book // On launch, create a basic window - (void)applicationDidFinishLaunching:(UIApplication *)application { UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[HelloController alloc] init]]; [window addSubview:nav.view]; [window makeKeyAndVisible]; } But a release is never called for window nor for nav. Release should be called since alloc was called, right? If #1 is right, then I would need to store a reference to each of these in an instance variable in order to release them in the dealloc? Perhaps I'm wrong all around...

    Read the article

  • Memory Management with returning char* function

    - by RageD
    Hello all, Today, without much thought, I wrote a simple function return to a char* based on a switch statement of given enum values. This, however, made me wonder how I could release that memory. What I did was something like this: char* func() { char* retval = new char; // Switch blah blah - will always return some value other than NULL since default: return retval; } I apologize if this is a naive question, but what is the best way to release the memory seeing as I cannot delete the memory after the return and, obviously, if I delete it before, I won't have a returned value. What I was thinking as a viable solution was something like this void func(char*& in) { // blah blah switch make it do something } int main() { char* val = new char; func(val); // Do whatever with func (normally func within a data structure with specific enum set so could run multiple times to change output) val = NULL; delete val; val = NULL; return 0; } Would anyone have anymore insight on this and/or explanation on which to use? Regards, Dennis M.

    Read the article

  • memory management objective c - returning objects from methods

    - by geeth
    Hi, Please clarify, how to deal with returned objects from methods? Below, I get employee details from GeEmployeetData function with autorelease, 1. Do I have to retain the returned object in Process method? 2. Can I release *emp in Process fucntion? -(void) Process { Employee *emp = [self GeEmployeetData] } +(Employee*) GeEmployeetData{ Employee *emp = [[Employee alloc]init]; //fill entity return [emp autorelease]; }

    Read the article

  • How to convince management to unblock stackoverflow.com?

    - by Abe Miessler
    The place I'm working at restricts a lot of sites (including SO). They have a company experts-exchange account that most of the people I work with are happy using. I told my manager that I prefer SO and asked him to unblock it but he just told me to use experts-exchange. Any suggestions on how to convince my corporate overlords that my time is better spent here?

    Read the article

  • Objective-C: alloc of object within init of another object (memory management)

    - by Stefan Klumpp
    In my .h file I have: NSMutableArray *myArray; @property (nonatomic, retain) NSMutableArray *myArray; My .m file looks basically like this: @synthesize myArray; - (id) init { self = [super init]; if (self != nil) { self.myArray = .... ? // here I want to create an empty array } return self; } - (void) dealloc { [self.myArray release]; [super dealloc]; } What I'm not sure about is what do to in the init. 1) self.myArray = [[NSMutableArray alloc] init]; 2) NSMutableArray *tmp = [[NSMutableArray alloc] init]; self.myArray = tmp; [tmp release]; Solution 1 doesn't seem right to me, because of my @property (retain) setting I automatically increase the retain counter when setting self.myArray, but additionally I have already a "+1 retain" due to the [NSMutableArray alloc]. Thus the second solution seems more correct to me, even though it is cumbersome. Also am I wondering if self.myArray = ... is actually the same as [self setMyArray:...] and thus does increase the retain count.

    Read the article

  • Objective C memory management question with NSArray

    - by Robert
    I am loading an array with floats like this: NSArray *arr= [NSArray arrayWithObjects: [NSNumber numberWithFloat:1.9], [NSNumber numberWithFloat:1.7], [NSNumber numberWithFloat:1.6], [NSNumber numberWithFloat:1.9],nil]; Now I know this is the correct way of doing it, however I am confused by the retail counts. Each Object is created by the [NSNumber numberWithFloat:] method. This gives the object a retain count of 1 dosnt it? - otherwise the object would be reclaimed The arrayWithObjects: method sends a retain message to each object. This means each object has a retain cont of 2. When the array is de-allocated each object is released leaving them with a retain count of 1. What have I missed?

    Read the article

  • Obj-C memory management for an NSView * instance variable

    - by massimoperi
    My custom view has a subview as an instance variable. Here is a sample interface: @interface MyCustomView : NSView { NSView *aSubview; } @end Then, in the .m file, I initialize aSubView and add it to the custom view. - (id)init { self = [super initWithFrame:CGRectMakeFrame(0.0, 0.0, 320.0, 480.0); if (self) { aSubview = [[NSView alloc] initWithFrame(0.0, 0.0, 100.0, 100.0); [self addSubview:aSubview]; } return self; } Where should I release aSubView? In the -dealloc method? - (void)dealloc { [aSubView release]; [super dealloc]; } Or directly after adding it to the custom view in the -init method? - (id)init { [...] [self addSubview:aSubview]; [aSubview release]; [...] } Which one is the best implementation?

    Read the article

  • SQL SERVER – Configure Management Data Collection in Quick Steps – T-SQL Tuesday #005

    - by pinaldave
    This article was written as a response to T-SQL Tuesday #005 – Reporting. The three most important components of any computer and server are the CPU, Memory, and Hard disk specification. This post talks about  how to get more details about these three most important components using the Management Data Collection. Management Data Collection generates the reports for the three said components by default. Configuring Data Collection is a very easy task and can be done very quickly. Please note: There are many different ways to get reports generated for CPU, Memory and IO. You can use DMVs, Extended Events as well Perfmon to trace the data. Keeping the T-SQL Tuesday subject of reporting this post is created to give visual tutorial to quickly configure Data Collection and generate Reports. From Book On-Line: The data collector is a core component of the Data Collection platform for SQL Server 2008 and the tools that are provided by SQL Server. The data collector provides one central point for data collection across your database servers and applications. This collection point can obtain data from a variety of sources and is not limited to performance data, unlike SQL Trace. Let us go over the visual tutorial on how quickly Data Collection can be configured. Expand the management node under the main server node and follow the direction in the pictures. This reports can be exported to PDF as well Excel by writing clicking on reports. Now let us see more additional screenshots of the reports. The reports are very self-explanatory  but can be drilled down to get further details. Click on the image to make it larger. Well, as we can see, it is very easy to configure and utilize this tool. Do you use this tool in your organization? Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: SQL Reporting, SQL Reports

    Read the article

  • Excel-based Performance Reviews transformed into Web Application for Performance Management

    - by Webgui
    HR TMS provides enterprise talent management solutions for healthcare, retail and corporate customers, focusing on performance management, compensation management and succession planning. As the competency of nurses and other healthcare workers is critical, the government, via the Joint Commission (JCAHO), tightly monitors their performances. On a regular basis, accredited healthcare organizations are required to review employee performance using a complex set of position dependent job descriptions and competencies. Middlesex Hospital managed their performance reviews for 2500 employees manually with Excel spreadsheets. This was a labor intensive process that proved to be error prone and difficult to manage. Reviews were not always where they belonged and the job descriptions and competencies for healthcare workers were difficult to keep accurate and up to date. As a result, when the Joint Commission visited and requested to see specific review documentation, there was intense stress. Middlesex Hospital needed to automate their review process, pull in the position information from those spreadsheets and be able to deliver reviews online. Users needed to have online access to those reviews from a standard browser. Although the manual system had its issues, it did have the advantage of being very comprehensive and familiar to users. The decision was made to provide a web-based solution that leveraged the look and feel of those spreadsheets in order to insure user acceptance of the system and minimize the training needed. Read the full article here >

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >