none
.NET profiling API and object allocation RRS feed

  • Question

  • Hi!
    Is it possible to get using the .NET profiling API the thread in which an object was allocated?
    There is the "ObjectAllocated" method we can override but it doesn't give us any clue which thread created this object ...

    thanks! :)

    Saturday, April 13, 2013 1:56 PM

Answers

  • ObjectAllocated is called on the thread that allocates the object.  So you can use

    GetCurrentThreadID.

    Thanks,
    Dave

    • Marked as answer by Number 2 Monday, April 15, 2013 6:48 PM
    Monday, April 15, 2013 6:13 PM