CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    6

    Is this array or vector leaking?

    Hi,

    I have written an xll (an excel dll) and it leaks like hell. Because of how it's built I have a hard time debuggin it. Could this be leaking?

    Code:
    double test() {
     int dynamicSize = 5;
     std::vector<double> v(dynamicSize);
     double* r = NULL;
     r = new double[dynamicSize];
    
     delete [] r;
     v.clear();
    }
    Thanks.
    Last edited by cilu; June 12th, 2009 at 05:39 AM. Reason: code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured