To Philip Lille - appropriate use of forums

Your previous post is being systematically deleted because it is a rant.
this is a user-to-user help forum.  If you have a question that some of us might be able to help with, then that is appropriate.  RANTS are not appropriate in this forum.
But feel free to give it to Apple as feedback in the appropriate forum.

Sylvia is probably right about the origin of that practice, memory leaks were a huge problem (and are to a lesser extent in Java). You really shouldn't avoid doing multiple returns to avoid memory leaks in C++ even. Usually when you allocate memory that you're expecting to simply disapear at the end of a function, you're going to allocate it as a stack variable, rather than using new, and it will be removed when it falls out of scope. There are some functions, like strcpy, and strdup, to name a few, that will allocate memory, and it's possible you could return out without removing that data. I find if this is likely to happen, the user probably wasn't thinking about releasing the data to begin with, and could just as easily return at the end of the function without releasing the memory, as he/she would at any point inside the function. I'd hope that you'd be using this newly created memory for some purpose before returning, so I would assume it's use would be complete before you left that function, and definitely it would be ready to be deleted.
-Jason Thomas.

Similar Messages

  • Appropriate use of "return" in a method

    Migrating to Java quite some time back now I still haven't found the appropriate use of the 'return'-statement in a method.
    In procedual languages there has always been an unwritten rule saying that a function should not have more than one 'return'-statement and that the 'return'-statement should always be the last line to be executed in the function.
    Having seen a lot of source code by other Java programmers I was puzzled to see that a lot of programmers uses multiple return statments and furthermore use them to terminate loops, etc.
    Example, binary search find method
    while ( current.key != key ){
        if ( key < current.key){
            current = current.leftChild;
        else{
            current = current.rightChild;
        if (current == null){
            return null;
    return current;As you can see in the example, 'return' is used in the middle of the loop to both return a value and to stop the rest of the processing in the method.
    Is there any recommended practise on using 'return'? Personally I don't like the idea of having more than one return statement in my code as the code can end up being irrational.
    What do guys think in the forum?
    Kind regards,
    Allan

    Sylvia is probably right about the origin of that practice, memory leaks were a huge problem (and are to a lesser extent in Java). You really shouldn't avoid doing multiple returns to avoid memory leaks in C++ even. Usually when you allocate memory that you're expecting to simply disapear at the end of a function, you're going to allocate it as a stack variable, rather than using new, and it will be removed when it falls out of scope. There are some functions, like strcpy, and strdup, to name a few, that will allocate memory, and it's possible you could return out without removing that data. I find if this is likely to happen, the user probably wasn't thinking about releasing the data to begin with, and could just as easily return at the end of the function without releasing the memory, as he/she would at any point inside the function. I'd hope that you'd be using this newly created memory for some purpose before returning, so I would assume it's use would be complete before you left that function, and definitely it would be ready to be deleted.
    -Jason Thomas.

  • Is it appropriate on the forum to...

    We're about to launch a product and I would like to know if
    it is OK to use this forum to determine interest, send a link to a
    demo, and ask what a reasonable price people would pay?

    Thanks Alan and John. We're working on the demo site now. As
    soon as we are ready, I will repost here. I just wanted to make
    sure it was appropriate. Apparently it is. Thanks.
    The product allows someone who does not know .html or flash
    to add new flash content to an existing .html page. The new content
    can be fun animations to context-sensitive multi-media help for an
    .html form. The context-sensitive help feature effect is much like
    TurboTax. Version 1.0 will be for IE only but V 2.0 will be
    cross-browser.
    We will include flash content with the product and will also
    sell libraries of flash content from fun animations to useful
    widgets. We are looking to partner with flash developers to license
    their existing flash content.
    Thanks,
    Steve

  • How to undo "This solved my question" on this Using iPhone forum?

    How to undo "This solved my question" on this "Using iPhone" forum?
    new to this forum... how do you undo this?

    **** lol, In that case they should give a warning or some type of "You sure?" yes/no. I clicked completely by mistake. anyways...

  • How can I use this forum?

    Does anybody here can tell me how can i use this forum???

    What do you want to do? What is your question?
    Randy

  • Tips for using the Forum - please read

    I saw this posted on another forum and thought it might help people here understand how to use the Forum and get more benefit from being here:
    Forum Tip: to reply to a post, please use the "Reply" button next to the message (the “arrow” button, second from the left), not the "Reply to the Original Message in this Topic" link.
    Forum Tip: if you have a problem and would like the best personal attention from experienced forum members do not Hi- Jack someone else's post in an attempt to solve your own problem..... start your own topic.... on the surface a lot of problems appear exactly the same..... they very seldom are.... by all means add to someone else's thread but do not use it as a means of solving your own problem.
    Forum Tip: try and describe your problem in your topic heading..... things like 'HELP' are useless.... many good people may pass your post without reading it.... and please, please supply vital info..... what computer, system, application.... version of.... what have you done to fix the problem..... give a full description of the problem and no SHOUTING or bumping allowed.
    Forum Tip: I would also add that it is important that you proof-read your post asking for help before you hit that "post message" button. But if you do make a mistake, or discover that your post is unclear then use the "Edit" button to make changes. The "Edit" button is the one with the pencil on it.
    Forum Tip: What do the different buttons by each message do?
    From left to right, the function of each button is explained below: ??Envelope icon = Email this post. ?Curved arrow = Reply to this message. ?Pencil icon = Edit this message. ?Trash can = Delete this message. ?Purple ribbon with small + sign = Bookmark this post. ?Large - sign = Rate this post negative. ?Large + sign = Rate this post positive. ?Blue or gray bar = Display the ratings on this post. ?
    Pause the mouse pointer on an icon and Help will be displayed.?
    Forum Tip: From the Apple Help and Terms of use files.
    State your question clearly. Include as much information as you can about your issue.
    At minimum, include:
    The operating system you're using and its version.
    The names and versions of other relevant products.
    A complete description of computer and connected peripherals.
    What you were doing when you ran into this issue.
    Example: I'm using Mac OS X 10.3.4 on a 20-inch flat panel iMac with 768 MB of RAM and 15 GB free space on my hard disk. I have an X-brand PDA connected via its USB cradle. iCal 1.5.2 unexpectedly quits when I add an event.
    Forum Tip: Test your answer. Make sure your answer works on your own computer before you post it. Do not guess.
    Forum Tip: Spend some time reading the discussion forums before you post. In the case of the most common problems the question has already been answered and you can find the answer by using the "Search" field in the upper right corner of the page. A simply search on the forms will provide a solution to this problem.
    TIP: Use the Apple Knowledge-base and Support pages for individual products. All of the most common problems can be solved by articles already posted to the K-BASE. Here is the link to the article providing the answer to the above example: Some songs in your iTunes library aren't copied to your iPod.
    The Apple Support Pages are a wealth of information that can help you solve problems and learn about your Macintosh and Apple products.
    Forum Tip: If you post a problem on the forums and then later on found the solution to it by yourself, and no one has posted in your thread, feel free to post in your thread letting others know how you solved the problem. This may help others who would otherwise need a solution for the same similar problem you had.

    Hey Jeff just wanna thank you for taking your time making this post. I just wanted to say hopefully it will help a lot of people. But awhile ago I was thinking and probably will start soon a FAQ post where I add in the most commonly questions people post in here. For example:
    What is the best protective case for the Nano?
    *List many good sites with good cases*
    How Do I reset my Nano?
    Answere here...can't think on top of my head
    Why wont my Nano turn on?
    Reset
    Of course it will be more detailed but you see my point?

  • Anyone hear use Adobe Forums? PSE 9 question.

    I needed to post a PSE 9 question and have been trying to use adobe forums for days. When I attempt to login, my browser goes into a redirect loop forever. Anyone else experienced this?
    Just in case I'll ask the Question here. I have PSE 9. Seems that the redo last filter with dialog box no longer functions (option-cmd-f). Did it go away? Now it brings up a Feather dialog.
    Bummer.

    I hope you receive some replies as I have a very similiar situation. I wish I could help but obviously I cannot.
    \Good luck!

  • I regularly use a forum and after a FF update I now cannot post responses

    I use internet forums but I now finding my capabilities to respond greatly reduced. The forum itself is a standard build with each reply box having a "Quote" and "Reply" button to respond with. (With an additional add reply at the end of the thread). All of these bring up the window as normal but I cannot type into the text box.
    I've asked for help from the forum, who suggested deleting cookies so I used the delete option (Short cut= Ctrl+Shift+Delete) and updated all the plugins. Still the same

    You didn't have enough battery power left when performing the update, and it died? That's bad.
    You should be able to reinstall OS X using OS X Recovery or in the case of an older MacBook Air running Snow Leopard, by using your original System Install DVD and Remote Install OS X from another Mac.
    Reinstalling OS X does not erase your user accounts or data.
    OS X Recovery:
    http://support.apple.com/kb/HT4718
    Remote Install OS X:
    http://support.apple.com/kb/HT2129

  • Hoq ro use the forum

    For the life of me I cannot figure out how to use the forum when I need information that does not apply to specific hardware or software. For instance I am trying to learn more about what harm comes about from spikes in voltage. I am participating in Folding at Home, a Stanford cooperative project seeking to find causes of serious deseases. I have been told that running these projects could damage the hard drive under certain voltage spikes.
    Where can I find such information?

    Be aware that no surge protector will protect against a direct lightning strike. See my user tip here:
    http://discussions.apple.com/thread.jspa?threadID=974986&tstart=30
    Your best bet if you want an extended time to be always on, is to find some way to stay totally off grid.

  • Being signed out **while I'm using the forums**

    I know these forums automatically log you out when you close the browser and don't have an option to stay logged in, but they are now doing something even more annoying, I'm am being signed out while I using the forums!!! Sometimes, this can be a little as a 5 minutes after I signed in
    I can be reading through a thread when, for no obvious reason, the browser window blanks and the page reloads - and I've been signed out.
    This is a real PITA. Is anyone else seeing this?

    HI,
    I tend to use Firefox for everyday stuff and have used version 3 through 13 on various OS versions form Panther through Lion.
    I occasionally sign in via Safari again across several versions without any issues.
    I have an issue in Lion where  the wireless Mouse that came with my iMac is a bit over sensitive to me trying to take hold of it for corrections and interpreting my finger movements and scrolling strokes.
    This causes the "Do you want to Leave Page" message that I can not always get rid of.
    Force Quitting will solve the drop down not accepting I don't want to leave, for about 20- 30 presses but Firefox will actually login in automatically when I restart it.
    I would tend to look for "Breaks" in your Internet service, particularly if you are using WiFi as this can be upset by interference from other nearby routers.
    9:30 PM      Sunday; July 8, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Problem Using Discussions Forums Lately

    I used to be able to use the forums a lot, but now I can barley get any Apple Discussions page to load and I have to reload the page two or three times before it will finally load very slowly. All other websites seem to work fine. This happens on both of my computers and on different providers. Is there something in the Settings I can change or something else I may have set wrong? I am using Safari 2.0.4

    Hi Bobaloo!
    The problems you experience, are probably nothing to do with your settings.
    The Discussions Forum has been exhibiting some intermittent server and synching problems lately.
    Although earlier this week it was quite evident, it's been fairly stable for the last couple of days.
    ali b

  • Why did I have to get a new username to use this forum?

    I have been a .mac subscriber for what seems like centuries (got my first SE in 89), and I've used the discussion forums elsewhere on the mac site a lot. Yet, today, even though the site properly identified me by name when I logged in, it forced me to choose a new username (my old one was "taken") and create a new account. What gives??

    Hi mariaangela!
    Are you sure that you entered the exact Apple ID and Password, that you formerly used, to access  Discussions?
    The Apple IDs were usually an Email address. And not the same as an Alias used in  Discussions.
    What is the Alias of your original account?
    ali b

  • Cómo utilizar este Foro / How to use this Forum

    Bienvenidos al Foro de Nómina Española!
    No duden en tratar aquí cualquier tema relacionado con nómina española.
    Nuestros moderadores supervisarán frecuentemente el foro.
    Como el foro está estrechamente vinculado al idioma Español y a textos legales en dicho idioma, gran parte de su contenido se desarrollará en castellano. El inglés también es un idioma admitido.
    Adicionalmente por favor colaboren en la mejora del WIKI ERP Human Capital Management, especialmente en las siguientes areas:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/ERP+Human+Capital+Management
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/SAP+HCM+Payroll+Spain
    English Version
    Welcome to the HCM Payroll Spain Forum!
    Do not hesitate to post here any issue related to Spanish Payroll.
    Our Moderators will also frequently check this Forum.
    As this country version is strongly related to spanish language and texts of law we will run this forum mainly in spanish language. English language is also allowed.
    Please also help us improving the ERP Human Capital Management WIKI specifically in these areas:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/ERP+Human+Capital+Management
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/SAP+HCM+Payroll+Spain

    Quote
    New System, Lots of problems!!
    KT4 Ultra (MS-6590 v1.X), AMD XP 2700+, 1Gb DDR PC3200 400Mhz Mem, Ati Radeon 9700 Pro, Creative Audigy + Live! Drive, 120Gb Maxtor Hdd ...Plus modem & Lan Card....Os: Win XP Professional Edition.
      All Drivers + Bios absolutely up to date, DX9.
     DXdiag, Now informs me that Direct 3d can't be used...Now let me get this straight, I can run applications..lovely,.......But I can't THRASH all the games!!!
    Have tried re-installing AGP drivers + Dx9, but no luck so far...
    Ps. Self-built Custom System.
    Anybody out there got an answer?
    I think this post was in error, I have PM'ed and e-mailed this user if I get no reply I will remove it in 24 hours regardless
    GF

  • How to use this forum's search

    Hi
    Is there an easy way to search just this forum? When using the "Search Forums" box at the top right, I get results from all different forums.
    I know I could go into "More options" or whatever its called, spend a minute or two finding the right Forum in the list and select it, hoping I got the right one. Thats not usable at all.
    Whats the better way?

    Quote
    New System, Lots of problems!!
    KT4 Ultra (MS-6590 v1.X), AMD XP 2700+, 1Gb DDR PC3200 400Mhz Mem, Ati Radeon 9700 Pro, Creative Audigy + Live! Drive, 120Gb Maxtor Hdd ...Plus modem & Lan Card....Os: Win XP Professional Edition.
      All Drivers + Bios absolutely up to date, DX9.
     DXdiag, Now informs me that Direct 3d can't be used...Now let me get this straight, I can run applications..lovely,.......But I can't THRASH all the games!!!
    Have tried re-installing AGP drivers + Dx9, but no luck so far...
    Ps. Self-built Custom System.
    Anybody out there got an answer?
    I think this post was in error, I have PM'ed and e-mailed this user if I get no reply I will remove it in 24 hours regardless
    GF

  • How to use this forum......

    Hi there....
    If you want to know all about the new forum, and how it works.....
    Clink on this link....
    There you can find all the answers to most asked questions....

    Quote
    New System, Lots of problems!!
    KT4 Ultra (MS-6590 v1.X), AMD XP 2700+, 1Gb DDR PC3200 400Mhz Mem, Ati Radeon 9700 Pro, Creative Audigy + Live! Drive, 120Gb Maxtor Hdd ...Plus modem & Lan Card....Os: Win XP Professional Edition.
      All Drivers + Bios absolutely up to date, DX9.
     DXdiag, Now informs me that Direct 3d can't be used...Now let me get this straight, I can run applications..lovely,.......But I can't THRASH all the games!!!
    Have tried re-installing AGP drivers + Dx9, but no luck so far...
    Ps. Self-built Custom System.
    Anybody out there got an answer?
    I think this post was in error, I have PM'ed and e-mailed this user if I get no reply I will remove it in 24 hours regardless
    GF

Maybe you are looking for

  • What is new in the upcoming portal 6.2

    Hi What is new in the upcoming portal 6.2 ? Will the new JSR168 portlet standard be supported ? If so... what else that is new ? Thanks Per-Olov

  • How to convert 14GB to 2GB for IMDB upload using FinalCut Pro 7?

    Hi, I am submitting a 12 minute film to festivals and need to convert it from 14GB to around 2GB for best quality results in order to upload it to IMDB so that it could be streamed. I use FinalCut Pro 7 but the compression/export settings for the fil

  • Iphone in recovery mode, how can i make assure that my data will not erase

    firstly thanks for quick reply. sorry sir, i am confused in last line you wrote, " This will erase the phone but you will be given an option at the end to restore to an existing backup, if you have one." i did not understand last sentence - if i have

  • Screen issue or Software Bug?

    see attached for a video. https://www.dropbox.com/s/98nlal8jt7qq8k0/IMG_6005.MOV Basically every reboot, at the OS X 10.9 login screen i get a distorted screen for several seconds, after about 5 seconds it stops and does not occur again when using th

  • Retain work item in user's inbox

    HI , I have a DMS approval workflow in which we have a requirement for text dialog box/editor to enter the approver's comment. which is working fine but if i click on cancel or dont enter any values in the body of the dialog box/editor.in that case t