Using new operator in if statement condition a bad idea?
<pre><code>if (!someList.Contains(new listItem(arg1, args2)))
{
    // Do some stuff
}
</code></pre>

<p>For the code segment above, <code>someList</code> is a list of structs and <code>listItem</code> is the struct.</p>

<p>Does using the new operator in this context result in a memory leak? Or is this an example of bad practice in general? I have searched around on SO and Google, but wasn't able to find a question that specifically addressed this.</p>
