[Liblas-devel] RE: LAS header major and minor version number

Martin Vales martinvales00 at gmail.com
Thu Dec 18 03:08:15 EST 2008


2008/12/18 Steve Harwin <SteveH at myriax.com>

> Hi,
>
> The had a another look at my code whilst trying to come up with a sample
> that shows the problem and I found that there was a chance that I was
> not always disposing the LASReader object, the dispose call is now in a
> finally block and since making that change I have not been able to
> replicate the version issue.  I will keep testing and get back to you
> with a sample if the problem reappears.
>
Hi steve.
humm. I believe the garbage collector call dispose when they think it´s
time. We can call dispose using dispose manually like in GDI graphics.
Perhaps i am wrong??.

The IDisposable interface defines a pattern (with language-level support)
that provides a deterministic
mechanism for freeing unmanaged resources and avoids the garbage
collector–related problems inherent
with destructors.

If we would use the typical c++ destructor:
~killCScharpCodeClass()
{
// i am Kill
}
we can not call the destructor by hand but using dispose we can.

The doub i have it´s if we have to call dispose always or only when we want
ensure the destructor was called immediately.


Regards.


> Thanks
> Steve
>
> _______________________________________________
> Liblas-devel mailing list
> Liblas-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/liblas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/liblas-devel/attachments/20081218/6855e955/attachment.html


More information about the Liblas-devel mailing list