Search Results

Search found 4 results on 1 pages for 'raged'.

Page 1/1 | 1 

  • 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

  • This not having job, is driving me nuts!

    - by Ratman21
    I had two jobs lined up (temporary but, hey they pay), one of which was in IT. A very low paying IT job for only 30 hours a week and only 3 weeks. At a large high tech company and a government (a not in my field job) temporary, paying a bit more, for little longer and for up to 40 hours a week. I was going to happily work my little self raged for the next 3 weeks. Guess what, the IT job fell thru and I now feel so let down. This I felt was my chance to get back in to IT, even if it was only for few weeks and maybe get note-us as hard working IT guy. I still have the other job but, let me add that there is no chance that it will turn in to something longer (I have been told that point blank). As I said this is nuts.

    Read the article

  • Why does my system slow down or freeze when there is heavy disk activity?

    - by user72270
    Im a first-time user to Ubuntu-12.04 with WUBI installation. My NoteBook Information : Dell vostro 3450 : i5 2410m, 3 gb ram, intel hd3000, amd 6630m hybrid. Surfing and playing games works flawlessly, however, I'm having huge problems when installing applications and generally copying and moving files. When doing so, system is significantly slower and freezes quite often (Firefox gets bluish, sometimes even black n white). I would say that Ubuntu allocates too much resources on file transfers and installing, but even these tasks are very slow. Here is very specific example : today, i tried to move 6 GB file from win 7 installation. It was good at first, i jumped to firefox but after a while firefox started to randomly turn bluish and mouse was randomly stopping working. It was gradually worse and worse and it got to a point when firefox black n whited and mouse wasn't working at all. I raged and went for some meal, when i got back screen was black. It probably unlogged me due to inactivity, when i pushed random button to bring screen to life i had to wait few minutes to let it show me only my screen background. No log in screen, just background and working mouse. NoteBook fan was working at 100 % so I assumed that file transfer was going on and I left it to work. Nothing then changed for a full hour so I hard rebooted it. File transfer unsuccessful, It transfered hardly 2 gigs. Is this normal ? What to do in these situations ? It didn't let me load system manager and not even terminal. Thanks.

    Read the article

  • Major inconsistencies in Zend Framework

    - by John Nall
    Okay first of all let me just say Zend Framework is the greatest tool I have ever used in 30+ years of programming (well, for web development, Qt wins the desktop market). However, through my use I have noticed some glaring and annoying inconsistencies. For instance, Zend_Form_Element's have a setAttrib() method. Now why the hell is this the only method in that API which is abbrev.? Why then am I using setRequired() instead of setReq()? I have more examples, I am extremely nerd raged about this. It is completely ruining what could have been God's gift to web development. FOR FUTURE REFERENCE NEVER ABBREV. THINGS WHEN MAKING AN API. also always filter data before storing it i m o Who do we talk to about this, where something will actually get done about it?

    Read the article

1