So I have started learning c++ recently, and as a .NET/Java developer I always want to write the following code.

var s = new myClass().

In c++ you have to manage memory yourself, there is no garbage collector.

If you do not use the new keyword var s = myClass() you will create that class and assign it to on the stack.

Any stack variables will be cleaned at the end of the block, so in this case s will be cleaned. However if you use var s = new myClass() s will be allocated onto the heap and must be deleted, otherwise memory leaks will occur.

To clean the variable you must call delete when you are done with the variable, this will cause the memory in the heap to be cleaned.
Continue reading

I recently created a small utility that is ran in jenkins to create indicies in ElasticSearch.

The first versions took around 5 hours to index our massive data into elasticsearch. This was still better than the 9 hours, our old solution took, so no one was complaining.

One of the major slowdowns was a .Where() on a List<T>. When I wrote the tool this TODO was written

//TODO: use some kind of key lookup here, but we need non-unique keys and Dictionaries are unique only
Continue reading

  • page 1 of 1

Tommy "TerribleDev" Parnell

Hi, my name is Tommy. I work very hard to deliver quality content, free. If I helped you please consider donating.


Software Engineer II


Boston Area