The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

    • G+ Na also, unnützes Wissen ist doch für was gut: "Sie haben mehr Punkte erreicht als 96% der Teilnehmer... ift.tt/2mCuSv8 2 hours ago
    • G+ Unpopular opinion: You should NOT be buying phones that do not ship with the latest version of Android... ift.tt/2mD7VYP 2 hours ago
    • G+ Welch herzallerliebste Naivität. Natürlich stimmt einiges, was sie schreibt, aber sie ist definitiv ... ift.tt/2zdUWTi 2 hours ago
    • @matijn @twelphcom Wat een leuke protegé heb je! Zo'n dag is toch heel wat anders dan de annegriep die ik dacht. Sorry voor dat. 3 hours ago
    • RT @CodeWisdom: "Computers are good at following instructions, but not at reading your mind." - Donald Knuth 3 hours ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,843 other followers

Archive for September 8th, 2014

Revisited from the .NET side: Why doesn’t WINWORD.EXE quit after Closing the document from Delphi? (via: Stack Overflow)

Posted by jpluimers on 2014/09/08

I long time ago, I asked about Why doesn’t WINWORD.EXE quit after Closing the document from Delphi?.

It turns out that question is a lot harder in .NET than it is in Delphi. I already had a gut feeling of this when at clients I saw many more .NET applications leaking WINWORD.EXE stray processes than Delphi applications, even though both kinds were calling Quit on the Word application object.

Delphi has a deterministic way of coping with interfaces (hence you can do a One-liner RAII in Delphi, or make a memento): Interface references are released at the end of their scope.

.NET has non-deterministic finalization of the Common Language Runtime (CLR) and has Runtime Callable Wrappers (RCWs) around your COM references which are sometimes created “on the fly”.

The combination of non-deterministic finalization and RCWs can be very confusing, so lets start with the parts first. Read the rest of this entry »

Posted in .NET, Delphi, Development, Software Development | 2 Comments »

 
%d bloggers like this: