#9448: segfault: django.contrib.gis.gdal.DataSource sub-objects not holding
references to parents
-------------------------------------------------+--------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  jbronn                
   
            Status:  assigned                    |     Milestone:  post-1.0     
            
         Component:  GIS                         |       Version:  1.0          
            
        Resolution:                              |      Keywords:  datasource 
layer segfault
             Stage:  Accepted                    |     Has_patch:  1            
            
        Needs_docs:  0                           |   Needs_tests:  0            
            
Needs_better_patch:  0                           |  
-------------------------------------------------+--------------------------
Changes (by jbronn):

  * keywords:  => datasource layer segfault

Comment:

 Replying to [comment:4 anonymous]:
 > The reason that it's a problem for `Layer`s but not for `Feature`s turns
 out to be something of an OGR wart: `GetLayer` returns a pointer to a
 layer object that is owned by the `DataSet`, but functions like
 `GetNextFeature` return copies of the individual features, which it's up
 to you to destroy.  You’re already doing that correctly: that's why
 `Feature` needs (and has) a `__del__` method but `Layer` does not.

 Thanks for the help looking this up, that explains it and reminds me what
 I was doing when I wrote it.

 > This patch looks great to me, and fixes my problem.

 Great!  My apologies for letting a segfault slip through, but thankfully
 it was found before 1.0.1 -- which this patch will be included in.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9448#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to