Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for shouldFinalize (0.15 sec)

  1. test/fixedbugs/issue27518b.go

    	for i := 0; i < len(*h); i++ {
    		if h[i] != filler {
    			err = "filler overwritten"
    		}
    	}
    }
    
    type StackObj struct {
    	h *HeapObj
    }
    
    func gc(shouldFinalize bool) {
    	runtime.GC()
    	runtime.GC()
    	runtime.GC()
    	if shouldFinalize != finalized {
    		err = "heap object finalized at the wrong time"
    	}
    }
    
    func main() {
    	var s StackObj
    	s.h = new(HeapObj)
    	s.h.init()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 03 19:54:23 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  2. test/fixedbugs/issue32477.go

    		h[i] = filler
    	}
    }
    func (h *HeapObj) check() {
    	for i := 0; i < len(*h); i++ {
    		if h[i] != filler {
    			err = "filler overwritten"
    		}
    	}
    }
    
    func gc(shouldFinalize bool) {
    	runtime.GC()
    	runtime.GC()
    	runtime.GC()
    	if shouldFinalize != finalized {
    		err = "heap object finalized at the wrong time"
    	}
    }
    
    func main() {
    	h := new(HeapObj)
    	h.init()
    	runtime.SetFinalizer(h, func(h *HeapObj) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 18:51:04 UTC 2019
    - 1.2K bytes
    - Viewed (0)
Back to top