Removed unnecessary namespace + added using statements for disposable objects

This commit is contained in:
d3agle 2015-08-21 21:40:58 -05:00
parent dbd5b4d453
commit 6d9e1602a7
2 changed files with 10 additions and 8 deletions

View File

@ -70,19 +70,22 @@ namespace xClient.Core.Helper
"SELECT AddressWidth FROM Win32_Processor");
// Perform the query and get the result.
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection queryCollection = searcher.Get();
foreach (ManagementObject queryObj in queryCollection)
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query))
{
if (queryObj["AddressWidth"].ToString() == "64")
using (ManagementObjectCollection queryCollection = searcher.Get())
{
return 64;
foreach (ManagementObject queryObj in queryCollection)
{
if (queryObj["AddressWidth"].ToString() == "64")
{
return 64;
}
}
return 32;
}
}
return 32;
}
/// <summary>
/// Gets the name of the operating system running on this computer (including the edition).
/// </summary>

View File

@ -8,7 +8,6 @@ using System.Security.Cryptography;
using System.Text;
using Microsoft.Win32;
using xClient.Core.Data;
using xClient.Core.Utilities;
namespace xClient.Core.Recovery.Browsers
{