Our website uses cookies to enhance your browsing experience.
Accept
to the top
close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Examples of errors detected by the V586…

Examples of errors detected by the V586 diagnostic

V586. The 'Foo' function is called twice to deallocate the same resource.


Blender

V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 176, 177. bf_intern_elbeem ntl_geometrymodel.cpp 177


int ntlGeometryObjModel::initModel(....)
{
  ....
  ntlSetVec3f averts; averts.mVerts.clear();
  ntlSetVec3f anorms; averts.mVerts.clear();
  ....
}

This is what should have been written here: ntlSetVec3f averts; averts.mVerts.clear(); ntlSetVec3f anorms; anorms.mVerts.clear();


OpenMW

V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 48, 49. components loadclot.cpp 49


void Clothing::blank()
{
  mData.mType = 0;
  mData.mWeight = 0;
  mData.mValue = 0;
  mData.mEnchant = 0;
  mParts.mParts.clear();
  mName.clear();
  mModel.clear();
  mIcon.clear();
  mIcon.clear();
  mEnchant.clear();
  mScript.clear();
}

VNL

V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 202, 203. testlib_main.cxx 203


void testlib_register_test(const vcl_string & name,
                           TestMainFunction func)
{
  testlib_test_func_.push_back(func);
  testlib_test_name_.push_back(name);
}

void testlib_cleanup()
{
  testlib_test_func_.clear();
  testlib_test_func_.clear();
}

Miranda NG

V586 The 'DeleteObject' function is called twice for deallocation of the same resource. Check lines: 264, 273. UInfoEx svc_flagsicons.cpp 273


static INT_PTR ServiceCreateMergedFlagIcon(....)
{
  HRGN hrgn;
  ....
  if (hrgn!=NULL) {
    SelectClipRgn(hdc,hrgn);
    DeleteObject(hrgn);
    ....
    DeleteObject(hrgn);
  }
  ....
}

OpenMW

V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 110, 117. loadregn.cpp 117


std::string mId, mName, mSleepList;

void Region::blank()
{
  mName.clear();

  mData.mClear = mData.mCloudy = mData.mFoggy = mData.mOvercast =
    mData.mRain = mData.mThunder = mData.mAsh,
    mData.mBlight = mData.mA = mData.mB = 0;

  mMapColor = 0;

  mName.clear();
  mSleepList.clear();
  mSoundList.clear();
}

mName string is cleared two times. Apparently mId string should be cleared in one place.


Blender

V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 149, 156. tile.cpp 156


int TileManager::gen_tiles(bool sliced)
{
  ....
  state.tiles.clear();         // <=
  ....
  int tile_index = 0;

  state.tiles.clear();
  state.tiles.resize(num);
  ....
}